Wiring of BuildinType
[mono.git] / mcs / docs / ecma334 / 17.4.4.xml
1 <?xml version="1.0"?>
2 <clause number="17.4.4" title="Field initialization">
3   <paragraph>The initial value of a field, whether it be a static field or an instance field, is the default value (<hyperlink>12.2</hyperlink>) of the field's type. It is not possible to observe the value of a field before this default initialization has occurred, and a field is thus never &quot;uninitialized&quot;. <example>[Example: The example <code_example><![CDATA[
4 using System;  
5 class Test  
6 {  
7    static bool b;  
8    int i;  
9    static void Main() {  
10       Test t = new Test();  
11       Console.WriteLine("b = {0}, i = {1}", b, t.i);  
12    }  
13 }  
14 ]]></code_example>produces the output <code_example><![CDATA[
15 b = False, i = 0  
16 ]]></code_example>because b and i are both automatically initialized to default values. end example]</example> </paragraph>
17 </clause>