Scope of Variables in C#
Scope of Variable is the region of code within which the variable can be accessed. It depends on the type of the variable and place of its declaration. In C#, there are several types of variables:
class Test { static int p; int n; void display(int x, ref int y, out int z, int [] a) { int q=25; ...... ...... } }
Recommended Posts:
C#
1. C# Features
2. Difference Between C++ and C#
3. Difference Between C# and Java
4. .NET Framework
5. Benefits of .NET
6. C# Program Structure
7. C# Command Line Arguments
8. Console.ReadLine() and Console.WriteLine()
9. C# Literals
10. C# Data Types
11. Scope of Variables in C#
12. Boxing and Unboxing in C#
13. C# Operators
14. C# Type Casting