method scope variable
using System; class IncDecApp { public static void Foo(int j) { Console.WriteLine("IncDecApp.Foo j = {0}", j); } static void Main(string[] args) { int i = 1; Console.WriteLine("Before Foo(i++) = {0}", i); Foo(i++); Console.WriteLine("After Foo(i++) = {0}", i); Console.WriteLine(); Console.WriteLine("Before Foo(++i) = {0}", i); Foo(++i); Console.WriteLine("After Foo(++i) = {0}", i); } }
1. | Class level Variable scope | ||
2. | Scoping in C#. | ||
3. | Scope class demonstrates instance and local variable scopes. | ||
4. | System maximums and minimums. |