What is Naming Convention and its types? Nishi Tiwari54710-Dec-2019please explain in brief.c#c# .net naming convention Updated on 10-Dec-2019
Nishi Tiwari
10-Dec-2019Naming convention can be defined as standard set of rules which tell us how an identifier will be used.
Whenever a question arises “how to name an element” the answer is naming convention.
Why it is required?
In above case, first case is difficult to read than second case where we read and understand easily what it is about.
So, naming convention is required to reduce the effort needed to read and understand the source code. It also maintains the consistency of data.
Different types of Naming Convention?
PascalCase
The first character of all words is upper case & other characters are lower case.Mainly used by classes and method name.
For example: -
camelCase
The first character of all words, except the first word ,is upper case & other characters are lower case.Mainly used by variables and method parameters.
For example:-