You now have access to the names of your code elements, such as variables and parameters. The .NET languages use the
NameOf expression to enable this feature.
Prior to 2015, you often had to indicate the name of a program element by enclosing it in a string. However, if the name of that code element changed, you had an error lurking in your code (unless you managed to remember to change the string value). For example, consider the following code that throws an instance of
ArgumentNullException. This class takes a string as the name of the argument. It then uses the string value to find your program element; it’s not strongly typed programming at all.
public void SaveFeedback(string feedback) ...