Using Identifiers


Using Identifiers

Identifiers are the names you use to identify the elements in your programs. In C#, 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# is a case-sensitive language: footballTeam and FootballTeam are not the same identifier.




Microsoft Visual C# 2005 Step by Step
Microsoft® Visual C#® 2005 Step by Step (Step By Step (Microsoft))
ISBN: B002CKYPPM
EAN: N/A
Year: 2005
Pages: 183
Authors: John Sharp

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net