Notations in C#
Naming conventions followed in C#:
Pascal casing on method names/ Class names where the first character is capitalized.
Camel casing on variable names where only first letter small and next connectible.
Hungarian notation specifies that a prefix be added to each variable to indicate its type e.g. int iAccountNo ;
In C# the Pascal and camel Casing are used in combination.
About variable names :
- You can’t start an identifier/variable name with a digit.
- You cannot use any of the C# keywords as identifier / variable names, C# does allow you to precede a keyword with an @, allowing it to be a legal identifier. For example, @for is a valid identifier. But its not recommended.
- C# is a case sensitive , so use of variable Total instead of total will cause an error.
0 Comments:
Post a Comment
<< Home