ObjectDisposedException.ThrowIf Metod
Definition
Viktigt
En del information gäller för förhandsversionen av en produkt och kan komma att ändras avsevärt innan produkten blir allmänt tillgänglig. Microsoft lämnar inga garantier, uttryckliga eller underförstådda, avseende informationen som visas här.
Överlagringar
| Name | Description |
|---|---|
| ThrowIf(Boolean, Object) |
Genererar ett ObjectDisposedException om angivet |
| ThrowIf(Boolean, Type) |
Genererar ett ObjectDisposedException om angivet |
ThrowIf(Boolean, Object)
Genererar ett ObjectDisposedException om angivet condition är true.
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)
Parametrar
- condition
- Boolean
Villkoret som ska utvärderas.
- instance
- Object
Objektet vars fullständiga namn ska inkluderas i eventuella resulterande ObjectDisposedException.
Undantag
condition är true.
Gäller för
ThrowIf(Boolean, Type)
Genererar ett ObjectDisposedException om angivet condition är true.
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)
Parametrar
- condition
- Boolean
Villkoret som ska utvärderas.
- type
- Type
Den typ vars fullständiga namn ska ingå i eventuella resulterande ObjectDisposedException.
Undantag
condition är true.