Click or drag to resize
InvalidOperationException Class
The exception that is thrown when a method call is invalid for the object's current state.
Inheritance Hierarchy

Namespace: System
Assembly: mscorlib (in mscorlib.dll) Version: 4.0.0.0
Syntax
C#
[SerializableAttribute]
public class InvalidOperationException : SystemException

The InvalidOperationException type exposes the following members.

Methods
  NameDescription
Public methodEquals(Object)
Determines whether the specified Object is equal to the current Object.
(Inherited from Object.)
Public methodGetHashCode
Serves as a hash function for a particular type.
(Inherited from Object.)
Public methodGetType
Gets the runtime type of the current instance.
(Inherited from Exception.)
Protected methodMemberwiseClone
Creates a shallow copy of the current Object.
(Inherited from Object.)
Public methodToString
Creates and returns a string representation of the current exception.
(Inherited from Exception.)
Top
Properties
  NameDescription
Public propertyInnerException
Gets the Exception instance that caused the current exception.
(Inherited from Exception.)
Public propertyMessage
Gets a message that describes the current exception.
(Inherited from Exception.)
Public propertyStackTrace
Gets a string representation of the immediate frames on the call stack.
(Inherited from Exception.)
Top
Events
  NameDescription
Protected eventSerializeObjectState
Occurs when an exception is serialized to create an exception state object that contains serialized data about the exception.
(Inherited from Exception.)
Top
See Also