Code inspection: Use 'nameof' expression to reference type name
This inspection reports expressions like typeof(SomeType).Name when the code only needs the compile-time type name. In that case, nameof(SomeType) expresses the intent more directly.
Example
var name = typeof(Customer).Name;
var name = nameof(Customer);
Quick-fix
nameof(...) is shorter, clearer, and avoids using reflection-style syntax when only a symbol name is needed.
30 March 2026