Scope Method in C#
Now we are going to learn about the scope method in c#.
Whenever we declare a variable inside the
method that is called method scope. It may also called local scope. Declared
variable is valid only particular method. Here we have an x variable defined outside
the Show() method. The variable has a class scope. It is valid everywhere inside
the definition of the Test class. In other words, between its curly brackets.
int x = 1;
Test ts =
Note: This article is ref. from