codeGK
Code it ALL
Global Variable in C# - CodeGK

♦ Global Variable in C#

♣ Example1: Global Variable in C#

The variable which can be accessed from any part of the code is called Global Variable.
Note that the variable should be declared and initialized above of calling.
These variable are so-called having Global Scope, that is, the scope of the variable is not limited to any part of the code.
In this example, Global Variable is illustrated.
Example
Input:
Output: