Information
The topic you requested is included in another documentation set. For convenience, it's displayed below. Choose Switch to see the topic in its original location.

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.

For a list of all members of this type, see NotSupportedException Members.

System.Object
   System.Exception
      System.SystemException
         System.NotSupportedException
            System.PlatformNotSupportedException

[Visual Basic]
<Serializable>
Public Class NotSupportedException
   Inherits SystemException
[C#]
[Serializable]
public class NotSupportedException : SystemException
[C++]
[Serializable]
public __gc class NotSupportedException : public SystemException
[JScript]
public
   Serializable
class NotSupportedException extends SystemException

Thread Safety

Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.

Remarks

There are methods that are not supported in the base class, with the expectation that these methods will be implemented in the derived classes instead. The derived class might implement only a subset of the methods from the base class, and throw NotSupportedException for the unsupported methods.

NotSupportedException is also thrown by System.IO classes whenever there is an attempt to read, seek, or write to a stream that does not support the invoked functionality.

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.

NotSupportedException uses the HRESULT COR_E_NOTSUPPORTED, which has the value 0x80131515.

For a list of initial property values for an instance of NotSupportedException, see the NotSupportedException constructors.

Requirements

Namespace: System

Platforms: Windows 98, Windows NT 4.0, Windows Millennium Edition, Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003 family, .NET Compact Framework

Assembly: Mscorlib (in Mscorlib.dll)

See Also

NotSupportedException Members | System Namespace | Exception | FileStream | Handling and Throwing Exceptions

Show:
© 2014 Microsoft