Jon Jagger
jon@jaggersoft.com
Table of Contents 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 Notes DownloadECMA-334 C# Language Specificationpreviousnextprevious at this levelnext at this level 17 Classesprevious at this levelnext at this level 17.4 Fieldsprevious at this levelnext at this level 17.4.4 Field initialization Paragraph 11 The initial value of a field, whether it be a static field or an instance field, is the default value (§12.2) of the field's type. 2 It is not possible to observe the value of a field before this default initialization has occurred, and a field is thus never "uninitialized". [Example: The example
using System;  
class Test  
{  
   static bool b;  
   int i;  
   static void Main() {  
      Test t = new Test();  
      Console.WriteLine("b = {0}, i = {1}", b, t.i);  
   }  
}  
produces the output
b = False, i = 0  
because b and i are both automatically initialized to default values. end example]
{ JSL }
Jagger Software Ltd
Company # 4070126
VAT # 762 5213 42
Valid HTML 4.01Valid CSS