Class InvalidOperationException
- Namespace
- System
- Assembly
- mscorlib.dll
The exception that is thrown when a method call is invalid for the object's current state.
public class InvalidOperationException : SystemException
- Inheritance
-
InvalidOperationException
- Derived
- Inherited Members
- Extension Methods
Constructors
InvalidOperationException()
Initializes a new instance of the InvalidOperationException class.
public InvalidOperationException()
InvalidOperationException(string)
Initializes a new instance of the InvalidOperationException class with a specified error message.
public InvalidOperationException(string message)
Parameters
message
stringThe message that describes the error.
InvalidOperationException(string, Exception)
Initializes a new instance of the InvalidOperationException class with a specified error message and a reference to the inner exception that is the cause of this exception.
public InvalidOperationException(string message, Exception innerException)
Parameters
message
stringThe error message that explains the reason for the exception.
innerException
ExceptionThe exception that is the cause of the current exception. If the innerException parameter is not a null reference (Nothing in Visual Basic), the current exception is raised in a catch block that handles the inner exception.