A name is a string of characters used to identify some entity in a program. C# imposes no limit on the length of names and all characters are significant (meaning that they are case sensitive).
However, identifiers in C# must obey the following rules (Jones, 2001)
- starts with either
- letters, or
- underscore character
- contains only
- letters
- digits
- underscore character
- must not be a keyword or a reserved word (which can be “escaped” by prefixing with the verbatim character @)
References
- Jones, B. L. (2001, December 14). Storing Information with Variables in C#. Retrieved from http://www.informit.com/articles/article.aspx?p=24472