C# language feature:
applies to
benefit
- Improves coding maintainance. Avoids hard coding of a variable name in error messages, logs, etc. i.e. facilitates refactoring/renaming variables.
how to use
- Replace string literal reference to variable with nameof(variable).
example: