Ask Learn
Preview
Ask Learn is an AI assistant that can answer questions, clarify concepts, and define terms using trusted Microsoft documentation.
Please sign in to use Ask Learn.
Sign inThis browser is no longer supported.
Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support.
Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
ThrowIf(Boolean, Object) |
Throws an ObjectDisposedException if the specified |
ThrowIf(Boolean, Type) |
Throws an ObjectDisposedException if the specified |
Throws an ObjectDisposedException if the specified condition
is 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)
The condition to evaluate.
The object whose type's full name should be included in any resulting ObjectDisposedException.
The condition
is true
.
Product | Versions |
---|---|
Throws an ObjectDisposedException if the specified condition
is 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)
The condition to evaluate.
The type whose full name should be included in any resulting ObjectDisposedException.
The condition
is true
.
Product | Versions |
---|---|
.NET feedback
.NET is an open source project. Select a link to provide feedback:
Ask Learn is an AI assistant that can answer questions, clarify concepts, and define terms using trusted Microsoft documentation.
Please sign in to use Ask Learn.
Sign in