public class NotSupportedException : SystemException
Object
Exception
SystemException
NotSupportedException
mscorlib
BCL
Represents the error that occurs when an object cannot perform an operation.
[Note: NotSupportedException is thrown when it is never possible for the object to perform the requested operation. A typical scenario is when a base class declares a method that derived classes are required to implement, and the method is invoked on the base class. When a method throws NotSupportedException this usually indicates that the derived classes must provide an implementation of the method, and callers must invoke the method on the derived class.For scenarios where it is sometimes possible for the object to perform the requested operation, and the object state determines whether the operation can be performed, see InvalidOperationException .
]
System Namespace
NotSupportedException Constructors
NotSupportedException() Constructor
NotSupportedException(System.String) Constructor
NotSupportedException(System.String, System.Exception) Constructor
public NotSupportedException();
Constructs and initializes a new instance of the NotSupportedException class.
This constructor initializes the System.NotSupportedException.Message property of the new instance to a system-supplied message that describes the error. This message takes into account the current system culture.The System.NotSupportedException.InnerException property is initialized to
null
.
System.NotSupportedException Class, System Namespace
public NotSupportedException(string message);
Constructs and initializes a new instance of the NotSupportedException class.
- message
- A String that describes the error. The content of 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.
This constructor initializes the System.NotSupportedException.Message property of the new instance using message. If message isnull
, the System.NotSupportedException.Message property is initialized to the system-supplied message provided by the constructor that takes no arguments. The System.NotSupportedException.InnerException property is initialized tonull
.
System.NotSupportedException Class, System Namespace
public NotSupportedException(string message, Exception innerException);
Constructs and initializes a new instance of the NotSupportedException class.
- message
- A String that describes the error. The content of 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.
- innerException
- An instance of Exception that is the cause of the current Exception. If innerException is non-null, then the current Exception was raised in a catch block handling innerException .
This constructor initializes the System.NotSupportedException.Message property of the new instance using message, and the System.NotSupportedException.InnerException property using innerException. If message isnull
, the System.NotSupportedException.Message property is initialized to the system-supplied message provided by the constructor that takes no arguments.[Note: For information on inner exceptions, see System.Exception.InnerException.]
System.NotSupportedException Class, System Namespace