C# – The nameof() operator

In C# 6 they added the nameof() operator. This outputs the name of the object passed in: nameof() eliminates duplication The DRY principle – Don’t Repeat Yourself – warns us against having duplication in the code. Whenever information or code is duplicated, it’s possible to change something in one spot but forget to change it … Read more