共用方式為


ObjectDisposedException.ThrowIf 方法

定義

多載

ThrowIf(Boolean, Object)

如果指定的 conditiontrue ,則會擲回 ObjectDisposedException

ThrowIf(Boolean, Type)

如果指定的 conditiontrue ,則會擲回 ObjectDisposedException

ThrowIf(Boolean, Object)

來源:
ObjectDisposedException.cs
來源:
ObjectDisposedException.cs
來源:
ObjectDisposedException.cs

如果指定的 conditiontrue ,則會擲回 ObjectDisposedException

public:
 static void ThrowIf(bool condition, System::Object ^ instance);
public static void ThrowIf (bool condition, object instance);
static member ThrowIf : bool * obj -> unit
Public Shared Sub ThrowIf (condition As Boolean, instance As Object)

參數

condition
Boolean

要評估的條件。

instance
Object

物件,其型別的完整名稱應該包含在任何產生的 ObjectDisposedException 中。

例外狀況

conditiontrue

適用於

ThrowIf(Boolean, Type)

來源:
ObjectDisposedException.cs
來源:
ObjectDisposedException.cs
來源:
ObjectDisposedException.cs

如果指定的 conditiontrue ,則會擲回 ObjectDisposedException

public:
 static void ThrowIf(bool condition, Type ^ type);
public static void ThrowIf (bool condition, Type type);
static member ThrowIf : bool * Type -> unit
Public Shared Sub ThrowIf (condition As Boolean, type As Type)

參數

condition
Boolean

要評估的條件。

type
Type

類型,其完整名稱應該包含在任何產生的 ObjectDisposedException 中。

例外狀況

conditiontrue

適用於