NotSupportedException Class

The exception that is thrown when an invoked method is not supported, or when there is an attempt to read, seek, or write to a stream that does not support the invoked functionality.

Syntax

Declaration

[ComVisible(true)]
[Serializable]
public class NotSupportedException : SystemException, ISerializable, _Exception

Inheritance Hierarchy

Constructors summary

Initializes a new instance of the NotSupportedException class, setting the Message property of the new instance to a system-supplied message that describes the error. This message takes into account the current system culture.

Initializes a new instance of the NotSupportedException class with a specified error message.

Initializes a new instance of the NotSupportedException class with a specified error message and a reference to the inner exception that is the cause of this exception.

Constructors

  • NotSupportedException()

    Initializes a new instance of the NotSupportedException class, setting the Message property of the new instance to a system-supplied message that describes the error. This message takes into account the current system culture.

    public NotSupportedException()
  • NotSupportedException(String)

    Initializes a new instance of the NotSupportedException class with a specified error message.

    public NotSupportedException(string message)

    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.

  • NotSupportedException(String, Exception)

    Initializes a new instance of the NotSupportedException class with a specified error message and a reference to the inner exception that is the cause of this exception.

    public NotSupportedException(string message, Exception innerException)

    Parameters

    • message

      The error message that explains the reason for the exception.

    • innerException

      The exception that is the cause of the current exception. If the innerException parameter is not a null reference, the current exception is raised in a catch block that handles the inner exception.

Details

Namespace

System

Assembly

System.Runtime.dll

See Also