CommunicationObject.ThrowIfDisposedOrImmutable Method ()

 
System_CAPS_noteNote

The .NET API Reference documentation has a new home. Visit the .NET API Browser on docs.microsoft.com to see the new experience.

Throws an exception if the communication object the State property is not set to the Created state.

Namespace:   System.ServiceModel.Channels
Assembly:  System.ServiceModel (in System.ServiceModel.dll)

member ThrowIfDisposedOrImmutable : unit -> unit

Exception Condition
InvalidOperationException

The communication object is in a Opening or Opened state.

ObjectDisposedException

The communication object is in a Closing or Closed state.

CommunicationObjectFaultedException

The communication object is in a Faulted state.

Since an object is immutable after Open is called on it, the only state that is both mutable and not disposed is the Created state.

.NET Framework
Available since 3.0
Silverlight
Available since 2.0
Windows Phone Silverlight
Available since 7.0
Return to top
Show: