View Single Post
  #2 (permalink)  
Old January 12th, 2010, 02:47 AM
om_prakash om_prakash is offline
Friend of Wrox
Points: 2,473, Level: 20
Points: 2,473, Level: 20 Points: 2,473, Level: 20 Points: 2,473, Level: 20
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: May 2004
Location: India
Posts: 642
Thanks: 0
Thanked 43 Times in 42 Posts
Default

To use variables in your C# programs, you must know how to create variable names. In C#, variable names must adhere to the following rules:
  1. The name can contain letters, digits, and the underscore character (_).
  2. The first character of the name must be a letter. The underscore is also a legal first character, but its use is not recommended at the beginning of a name. An underscore is often used with special commands, and it's sometimes hard to read.
  3. Case matters (that is, upper- and lowercase letters). C# is case-sensitive; thus, the names count and Count refer to two different variables.
  4. C# keywords can't be used as variable names. Recall that a keyword is a word that is part of the C# language. (A complete list of the C# keywords can be found in Appendix B, "C# Keywords.")
Please check the following link on variables:
http://www.codeguru.com/csharp/sampl...le.php/c11387/
__________________
Om Prakash Pant
Click the "Thanks" button if this post helped you.