Fix null sessions in HttpContextWrapper.Session
[mono.git] / mcs / class / corlib / Documentation / en / System / TypeInitializationException.xml
1 <Type Name="TypeInitializationException" FullName="System.TypeInitializationException" FullNameSP="System_TypeInitializationException" Maintainer="ecma">
2   <TypeSignature Language="ILASM" Value=".class public sealed serializable TypeInitializationException extends System.SystemException" />
3   <TypeSignature Language="C#" Value="public sealed class TypeInitializationException : SystemException" />
4   <MemberOfLibrary>BCL</MemberOfLibrary>
5   <AssemblyInfo>
6     <AssemblyName>mscorlib</AssemblyName>
7     <AssemblyPublicKey>[00 00 00 00 00 00 00 00 04 00 00 00 00 00 00 00 ]</AssemblyPublicKey>
8     <AssemblyVersion>1.0.5000.0</AssemblyVersion>
9     <AssemblyVersion>2.0.0.0</AssemblyVersion>
10     <AssemblyVersion>4.0.0.0</AssemblyVersion>
11   </AssemblyInfo>
12   <ThreadingSafetyStatement>All public static members of this type are safe for multithreaded operations. No instance members are guaranteed to be thread safe.</ThreadingSafetyStatement>
13   <Base>
14     <BaseTypeName>System.SystemException</BaseTypeName>
15   </Base>
16   <Interfaces />
17   <Docs>
18     <summary>
19       <para> Represents the error that occurs when an exception is thrown inside the
20       static constructor of a type.</para>
21     </summary>
22     <remarks>
23       <para> When a static constructor fails to initialize a type, a
24    <see cref="T:System.TypeInitializationException" /> instance is created and passed a reference to the exception
25       thrown by the static constructor. The <see cref="!:System.TypeInitializationException.InnerException" /> property stores the exception that was thrown
26       by the static constructor.</para>
27     </remarks>
28     <example>
29       <para>The following example demonstrates an error that causes
30       a <see cref="T:System.TypeInitializationException" /> exception.</para>
31       <code lang="C#">using System;
32 class TypeInit {
33     // Static constructor
34    static TypeInit () {
35           // Throw an application-defined exception.
36         throw new ApplicationException("Error in Class TypeInit");
37     }
38     public TypeInit() {}
39 }
40 class TestTypeInit {
41     static public void Main() {
42         try {
43             TypeInit t = new TypeInit ();
44         }
45         catch (TypeInitializationException e) {
46             Console.WriteLine("Error: {0}",e);
47         }
48     }
49 }
50    </code>
51       <para>The output is</para>
52       <code>
53 Error: System.TypeInitializationException: The type initializer for "TypeInit" threw an exception. ---&gt; System.ApplicationException: Error in Class TypeInit
54    at TypeInit..cctor()
55    --- End of inner exception stack trace ---
56    at TypeInit..ctor()
57    at TestTypeInit.Main()
58  </code>
59     </example>
60   </Docs>
61   <Members>
62     <Member MemberName=".ctor">
63       <MemberSignature Language="C#" Value="public TypeInitializationException (string fullTypeName, Exception innerException);" />
64       <MemberType>Constructor</MemberType>
65       <Parameters>
66         <Parameter Name="fullTypeName" Type="System.String" />
67         <Parameter Name="innerException" Type="System.Exception" />
68       </Parameters>
69       <Docs>
70         <param name="fullTypeName">To be added.</param>
71         <param name="innerException">To be added.</param>
72         <summary>To be added.</summary>
73         <remarks>To be added.</remarks>
74       </Docs>
75       <AssemblyInfo>
76         <AssemblyVersion>1.0.5000.0</AssemblyVersion>
77         <AssemblyVersion>2.0.0.0</AssemblyVersion>
78         <AssemblyVersion>4.0.0.0</AssemblyVersion>
79       </AssemblyInfo>
80     </Member>
81     <Member MemberName="GetObjectData">
82       <MemberSignature Language="C#" Value="public override void GetObjectData (System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context);" />
83       <MemberType>Method</MemberType>
84       <ReturnValue>
85         <ReturnType>System.Void</ReturnType>
86       </ReturnValue>
87       <Parameters>
88         <Parameter Name="info" Type="System.Runtime.Serialization.SerializationInfo" />
89         <Parameter Name="context" Type="System.Runtime.Serialization.StreamingContext" />
90       </Parameters>
91       <Docs>
92         <param name="info">To be added.</param>
93         <param name="context">To be added.</param>
94         <summary>To be added.</summary>
95         <remarks>To be added.</remarks>
96       </Docs>
97       <AssemblyInfo>
98         <AssemblyVersion>1.0.5000.0</AssemblyVersion>
99         <AssemblyVersion>2.0.0.0</AssemblyVersion>
100         <AssemblyVersion>4.0.0.0</AssemblyVersion>
101       </AssemblyInfo>
102     </Member>
103     <Member MemberName="TypeName">
104       <MemberSignature Language="ILASM" Value=".property string TypeName { public hidebysig specialname instance string get_TypeName() }" />
105       <MemberSignature Language="C#" Value="public string TypeName { get; }" />
106       <MemberType>Property</MemberType>
107       <ReturnValue>
108         <ReturnType>System.String</ReturnType>
109       </ReturnValue>
110       <Parameters />
111       <Docs>
112         <summary>
113           <para> Gets the fully qualified name of the type that causes the
114       exception.</para>
115         </summary>
116         <value>
117           <para>A <see cref="T:System.String" /> that contains the fully qualified name of the type that caused the exception.</para>
118         </value>
119         <remarks>
120           <para>This property is read-only.</para>
121           <para>The <see cref="P:System.TypeInitializationException.TypeName" /> property returns the same value as was
122    passed into the constructor.</para>
123         </remarks>
124       </Docs>
125       <Excluded>0</Excluded>
126       <AssemblyInfo>
127         <AssemblyVersion>1.0.5000.0</AssemblyVersion>
128         <AssemblyVersion>2.0.0.0</AssemblyVersion>
129         <AssemblyVersion>4.0.0.0</AssemblyVersion>
130       </AssemblyInfo>
131     </Member>
132   </Members>
133   <TypeExcluded>0</TypeExcluded>
134   <Attributes>
135     <Attribute>
136       <AttributeName>System.Runtime.InteropServices.ComVisible(true)</AttributeName>
137     </Attribute>
138   </Attributes>
139 </Type>