Declaration in C# and SQL Coding

 While coding in C# and SQL, there are some specific manner to declare the variables. There are two types of variables in coding language : 1 Global Variable and 2. Local Variable. 

1. Global Variable : The variable which are used to declare while we start the coding or before the functions, so that variable will be available globally in your code.

2. Local Variable : The variable which are used to declared locally in each function, for temporary use in your coding which you can't use it after the closing of that function.

Now, Did you know about "camelCasing " ??

                                camelCasing is the style of writing the phrase without space or punctuation but indicate the separation of the words by capitalize the first letter of second word. Examples : eCount, eCountBook, and many more. So here also we use this method to declare the variables in your coding.

Now, in that also there are two types of camelCasing used to declare the variables.

1. To declare the "ClassName"

2. To declare the "functionName"


1. To declare the "ClassName" :

                        When you are declaring the ClassName in your coding, you have to write the First letter Capitalize in both words as per CamelCasing method.

Example : 
                 
public class ProductCategory{

                        }

2. To declare the "functionName" :

                        While declaring the functionName you change the camelCasing style to differentiate the function and class in your coding so to declare the functionName you have to write the first letter Capitalize of your second word. For Example : 

                public void Save(ProductCategory productCategory){

                    } 

And after this, you can use the camelCasing method to declare the variables also to maintain the continuity and professional manner in your coding.

Examples to declare the variables :  

//Right Method to declare :

                private int ItemCount = 100;

//Improper method to declare the variables: 

                 private Int16 iteCount = 100; private Int32 I = 100;



                                                                Thank You.