ECMA-334: 12.1 Variable categories
Microsoft .NET Framework, ASP.NET, Visual C# (CSharp, C Sharp, C-Sharp) Developer Training, Visual Studio
| C# Language Specification |
| © 2006 ECMA International |
12.1 Variable categories
C# defines seven categories of variables: static variables, instance variables, array elements, value parameters, reference parameters, output parameters, and local variables. The subclauses that follow describe each of these categories.
[Example: In the following code
class A { public static int x; int y; void F(int[] v, int a, ref int b, out int c) { int i = 1; c = a + b++; } }
x is a static variable, y is an instance variable, v[0] is an array element, a is a value parameter, b is a
reference parameter, c is an output parameter, and i is a local variable. end example]