System.NotSupportedException Class

public class NotSupportedException : SystemException

Base Types

Object
  Exception
    SystemException
      NotSupportedException

Assembly

mscorlib

Library

BCL

Summary

Represents the error that occurs when an object cannot perform an operation.

Description

[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 .

]

See Also

System Namespace

Members

NotSupportedException Constructors

NotSupportedException() Constructor
NotSupportedException(System.String) Constructor
NotSupportedException(System.String, System.Exception) Constructor


NotSupportedException() Constructor

public NotSupportedException();

Summary

Constructs and initializes a new instance of the NotSupportedException class.

Description

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 .

See Also

System.NotSupportedException Class, System Namespace

NotSupportedException(System.String) Constructor

public NotSupportedException(string message);

Summary

Constructs and initializes a new instance of the NotSupportedException class.

Parameters

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.

Description

This constructor initializes the System.NotSupportedException.Message property of the new instance using message. If message is null , 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 to null .

See Also

System.NotSupportedException Class, System Namespace

NotSupportedException(System.String, System.Exception) Constructor

public NotSupportedException(string message, Exception innerException);

Summary

Constructs and initializes a new instance of the NotSupportedException class.

Parameters

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 .

Description

This constructor initializes the System.NotSupportedException.Message property of the new instance using message, and the System.NotSupportedException.InnerException property using innerException. If message is null , 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.]

See Also

System.NotSupportedException Class, System Namespace