Using Identifiers
Identifiers are the names you use to identify the elements in your programs. In C# 2005, you must adhere to the following syntax rules when choosing identifiers:
-
You can use only letters (uppercase and lowercase), digits, and underscore characters.
-
An identifier must start with a letter (an underscore is considered a letter).
For example, result, _score, footballTeam, and plan9 are all valid identifiers, whereas result%, footballTeam$, and 9plan are not.
IMPORTANT
C# 2005 is a case-sensitive language: footballTeam and FootballTeam are not the same identifier.
C# 2005 is a case-sensitive language: footballTeam and FootballTeam are not the same identifier.

本文介绍了C#2005中标识符的使用规则,包括标识符可以使用的字符类型、起始字符的要求等,并举例说明了有效的标识符示例。值得注意的是,C#2005区分大小写。
2484

被折叠的 条评论
为什么被折叠?



