更新:2007 年 11 月
當不支援叫用的方法,或是嘗試讀取、搜尋或寫入不支援叫用功能的資料流時,所擲回的例外狀況。
命名空間:
System
組件:
mscorlib (在 mscorlib.dll 中)
<SerializableAttribute> _
<ComVisibleAttribute(True)> _
Public Class NotSupportedException _
Inherits SystemException
Dim instance As NotSupportedException
[SerializableAttribute]
[ComVisibleAttribute(true)]
public class NotSupportedException : SystemException
[SerializableAttribute]
[ComVisibleAttribute(true)]
public ref class NotSupportedException : public SystemException
/** @attribute SerializableAttribute */
/** @attribute ComVisibleAttribute(true) */
public class NotSupportedException extends SystemException
public class NotSupportedException extends SystemException
在基底類別中有不支援的方法,但例外狀況可以在衍生類別中實作這些方法。衍生類別只可能實作基底類別裡方法的子集,並且擲回不支援的方法的 NotSupportedException。
每當嘗試讀取、搜尋或寫入不支援叫用功能的資料流時,System.IO 類別也會擲回 NotSupportedException。
如需物件有可能會執行必要的作業、並且物件的狀態會判斷作業是否可執行的案例,請參閱 InvalidOperationException。
NotSupportedException 使用值為 0x80131515 的 HRESULT COR_E_NOTSUPPORTED。
如需 NotSupportedException 執行個體的初始屬性值的清單,請參閱 NotSupportedException 建構函式。
System..::.Object
System..::.Exception
System..::.SystemException
System..::.NotSupportedException
System..::.PlatformNotSupportedException
這個型別的任何 Public static (在 Visual Basic 中為 Shared) 成員都具備執行緒安全。並非所有的執行個體成員都是安全執行緒。
Windows Vista, Windows XP SP2, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP Starter Edition, Windows Server 2003, Windows Server 2000 SP4, Windows Millennium Edition, Windows 98, Windows CE, Windows Mobile for Smartphone, Windows Mobile for Pocket PC, Xbox 360
.NET Framework 和 .NET Compact Framework 並不支援各種平台的所有版本。如需支援平台版本的相關資訊,請參閱 .NET Framework 系統需求。
.NET Framework
支援版本:3.5、3.0、2.0、1.1、1.0
.NET Compact Framework
支援版本:3.5、2.0、1.0
XNA Framework
支援版本:2.0、1.0
參考
其他資源