Fix null sessions in HttpContextWrapper.Session
[mono.git] / mcs / class / corlib / Documentation / en / System / InvalidOperationException.xml
1 <Type Name="InvalidOperationException" FullName="System.InvalidOperationException" FullNameSP="System_InvalidOperationException" Maintainer="ecma">
2   <TypeSignature Language="ILASM" Value=".class public serializable InvalidOperationException extends System.SystemException" />
3   <TypeSignature Language="C#" Value="public class InvalidOperationException : 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 operation cannot be
20       performed.</para>
21     </summary>
22     <remarks>
23       <block subset="none" type="note">
24         <para>
25           <see cref="T:System.InvalidOperationException" /> is typically thrown when the state of
26       one or more objects determines whether an operation can be performed.</para>
27         <para>The <see cref="T:System.InvalidOperationException" /> exception should not be thrown for
28    errors caused by invalid arguments. For invalid argument errors, throw <see cref="T:System.ArgumentException" /> or one
29    of its derived types, such as <see cref="T:System.ArgumentNullException" /> or <see cref="T:System.ArgumentOutOfRangeException" />. </para>
30         <para> The ldflda CIL instruction throws <see cref="T:System.InvalidOperationException" />. </para>
31       </block>
32     </remarks>
33     <example>
34       <para>The following example demonstrates an error that causes
35       a <see cref="T:System.InvalidOperationException" /> exception.</para>
36       <code lang="C#">using System;
37 using System.Collections;
38 public class InvalidOpExample  {
39   public static void Main()  {
40     int[] array = {0,0};
41     IEnumerator enumerator = array.GetEnumerator();
42     Console.Write("{0}",enumerator.Current);
43   }
44 }
45    </code>
46       <para>The output is</para>
47       <c>
48         <para>Unhandled Exception: System.InvalidOperationException: Enumeration has not
49          started. Call MoveNext.</para>
50         <para>at System.SZArrayEnumerator.get_Current()</para>
51         <para>at InvalidOpExample.Main()</para>
52       </c>
53     </example>
54   </Docs>
55   <Members>
56     <Member MemberName=".ctor">
57       <MemberSignature Language="ILASM" Value="public rtspecialname specialname instance void .ctor()" />
58       <MemberSignature Language="C#" Value="public InvalidOperationException ();" />
59       <MemberType>Constructor</MemberType>
60       <ReturnValue />
61       <Parameters />
62       <Docs>
63         <summary>
64           <para>Constructs and initializes a new instance of the <see cref="T:System.InvalidOperationException" />
65 class.</para>
66         </summary>
67         <remarks>
68           <para>This constructor initializes the <see cref="!:System.InvalidOperationException.Message" /> property of the new instance to a system-supplied
69    message that describes the error, such as "The requested operation cannot be
70    performed." This message takes into account the current system culture.</para>
71           <para>The <see cref="!:System.InvalidOperationException.InnerException" /> property is initialized to 
72 <see langword="null" />.</para>
73         </remarks>
74       </Docs>
75       <Excluded>0</Excluded>
76       <AssemblyInfo>
77         <AssemblyVersion>1.0.5000.0</AssemblyVersion>
78         <AssemblyVersion>2.0.0.0</AssemblyVersion>
79         <AssemblyVersion>4.0.0.0</AssemblyVersion>
80       </AssemblyInfo>
81     </Member>
82     <Member MemberName=".ctor">
83       <MemberSignature Language="ILASM" Value="public rtspecialname specialname instance void .ctor(string message)" />
84       <MemberSignature Language="C#" Value="public InvalidOperationException (string message);" />
85       <MemberType>Constructor</MemberType>
86       <ReturnValue />
87       <Parameters>
88         <Parameter Name="message" Type="System.String" />
89       </Parameters>
90       <Docs>
91         <param name="message">A <see cref="T:System.String" /> that describes the error. The content of <paramref name="message" /> is intended to be understood by humans. The caller of this constructor is required to ensure that this string has been localized for the current system culture.</param>
92         <summary>
93           <para>Constructs and initializes a new instance of the <see cref="T:System.InvalidOperationException" />
94 class.</para>
95         </summary>
96         <remarks>
97           <para>This constructor initializes the <see cref="!:System.InvalidOperationException.Message" /> property of the new instance using <paramref name="message" />. If <paramref name="message" /> is 
98 <see langword="null" />, the <see cref="!:System.InvalidOperationException.Message" /> property is initialized to a system-supplied message. The <see cref="!:System.InvalidOperationException.InnerException" /> property is initialized to <see langword="null" />.</para>
99         </remarks>
100       </Docs>
101       <Excluded>0</Excluded>
102       <AssemblyInfo>
103         <AssemblyVersion>1.0.5000.0</AssemblyVersion>
104         <AssemblyVersion>2.0.0.0</AssemblyVersion>
105         <AssemblyVersion>4.0.0.0</AssemblyVersion>
106       </AssemblyInfo>
107     </Member>
108     <Member MemberName=".ctor">
109       <MemberSignature Language="C#" Value="protected InvalidOperationException (System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context);" />
110       <MemberType>Constructor</MemberType>
111       <Parameters>
112         <Parameter Name="info" Type="System.Runtime.Serialization.SerializationInfo" />
113         <Parameter Name="context" Type="System.Runtime.Serialization.StreamingContext" />
114       </Parameters>
115       <Docs>
116         <param name="info">To be added.</param>
117         <param name="context">To be added.</param>
118         <summary>To be added.</summary>
119         <remarks>To be added.</remarks>
120       </Docs>
121       <AssemblyInfo>
122         <AssemblyVersion>1.0.5000.0</AssemblyVersion>
123         <AssemblyVersion>2.0.0.0</AssemblyVersion>
124         <AssemblyVersion>4.0.0.0</AssemblyVersion>
125       </AssemblyInfo>
126     </Member>
127     <Member MemberName=".ctor">
128       <MemberSignature Language="ILASM" Value="public rtspecialname specialname instance void .ctor(string message, class System.Exception innerException)" />
129       <MemberSignature Language="C#" Value="public InvalidOperationException (string message, Exception innerException);" />
130       <MemberType>Constructor</MemberType>
131       <ReturnValue />
132       <Parameters>
133         <Parameter Name="message" Type="System.String" />
134         <Parameter Name="innerException" Type="System.Exception" />
135       </Parameters>
136       <Docs>
137         <param name="message">A <see cref="T:System.String" /> that describes the error. The content of <paramref name="message" /> is intended to be understood by humans. The caller of this constructor is required to ensure that this string has been localized for the current system culture.</param>
138         <param name="innerException">An instance of <see cref="T:System.Exception" /> that is the cause of the current Exception. If <paramref name="innerException" /> is non-null, then the current Exception was raised in a catch block handling <paramref name="innerException" /> .</param>
139         <summary>
140           <para>Constructs and initializes a new instance of the <see cref="T:System.InvalidOperationException" />
141 class.</para>
142         </summary>
143         <remarks>
144           <para>This constructor initializes the <see cref="!:System.InvalidOperationException.Message" /> property of the new instance using <paramref name="message" />, and
145    the <see cref="!:System.InvalidOperationException.InnerException" /> property using
146 <paramref name="innerException" />. If <paramref name="message" /> is 
147 <see langword="null" />, the <see cref="!:System.InvalidOperationException.Message" /> property is initialized to a system-supplied message.</para>
148           <para>
149             <block subset="none" type="note">For information on
150    inner exceptions, see <see cref="P:System.Exception.InnerException" />
151    .</block>
152           </para>
153         </remarks>
154       </Docs>
155       <Excluded>0</Excluded>
156       <AssemblyInfo>
157         <AssemblyVersion>1.0.5000.0</AssemblyVersion>
158         <AssemblyVersion>2.0.0.0</AssemblyVersion>
159         <AssemblyVersion>4.0.0.0</AssemblyVersion>
160       </AssemblyInfo>
161     </Member>
162   </Members>
163   <TypeExcluded>0</TypeExcluded>
164   <Attributes>
165     <Attribute>
166       <AttributeName>System.Runtime.InteropServices.ComVisible(true)</AttributeName>
167     </Attribute>
168   </Attributes>
169 </Type>