ThrowIfDisposed Method

CommunicationObject.ThrowIfDisposed Method

[ This article is for Windows Phone 8 developers. If you’re developing for Windows 10, see the latest documentation. ]

Throws an exception if the communication object is disposed.

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

protected internal void ThrowIfDisposed()

ExceptionCondition
ObjectDisposedException

The communication object is in a Closing or Closed state.

CommunicationObjectFaultedException

The communication object is in a Faulted state.

No exception is thrown if the communication object is in a Created, Opening or Opened state. A communication object is disposed once Close is called on it.

Windows Phone OS

Supported in: 8.1, 8.0, 7.1, 7.0

Windows Phone

Show:
© 2017 Microsoft