The following rules should be remembered while naming variables or constants:
- It must begin with an alphabet or an underscore (_).
- It must only contain alphabets, numbers, and underscores.
- Maximum length of variable or a constant name is 1023 characters.
- Variable or Constant name must not contain any keywords or special symbols.
- Variable or Constant names are case-insensitive. This means ABC and abc are same. However, the common language runtime (CLR) uses case-sensitive binding. Therefore, when you produce an assembly or a DLL and make it available to other assemblies, your names are no longer case-insensitive. For example, if you define a class with a variable| constant called ABC, and other assemblies make use of your class through the common language runtime, they must refer to the element as ABC. If you subsequently recompile your class and change the element's name to abc, the other assemblies using your class could no longer access that element. Therefore, when you release an updated version of an assembly, you should not change the alphabetic case of any public variables|constant.