ReSharper 2025.1 Help

Code inspection: Redundant type arguments inside 'nameof'

This inspection detects redundant type arguments inside nameof() expressions. In most cases, the type argument is implied and doesn't need to be explicitly stated, which helps simplify and clean up the code.

var name = nameof(MyClass<int>.MyMethod);
var name = nameof(MyClass.MyMethod);

To resolve this issue, remove unnecessary type arguments inside nameof(). This makes the code less verbose while retaining the same functionality.

Last modified: 20 March 2025