Windows apps
Collapse the table of content
Expand the table of content
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.


[Visual Basic]
Public Class NotSupportedException
   Inherits SystemException
public class NotSupportedException : SystemException
public __gc class NotSupportedException : public SystemException
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.


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.


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

© 2017 Microsoft