C # identifier

C # identifier

  • Identifier is used to identify the class, variables, functions, or any other user defined items. (Popular to say that the class name, variable names, function names, etc.) in C #, class names must follow the following basic rules:
  • The identifier must begin with a letter, underscore, or @, can be followed by a series of letters, numbers (0--9), underscore (_), @.
  • Identifiers of the first character can not be a number.
  • Identifier must not contain any embedded spaces or symbols, such as - + #% ^ & * () [] {};:?! ' "/ \.
  • Identifiers can not be C # keywords. Unless they have a @ prefix. For example, @ if a valid identifier, but if not, because if a keyword.
  • The identifier must be case-sensitive. Uppercase and lowercase letters are considered different letters.
  • Not the same as the library name to C #.

Guess you like

Origin www.cnblogs.com/wodewei/p/11493238.html