共用方式為


CommunicationObject.ThrowIfDisposed 方法

定義

如果已處置通訊物件,則會擲回例外狀況。

protected public:
 void ThrowIfDisposed();
protected internal void ThrowIfDisposed ();
member this.ThrowIfDisposed : unit -> unit
Protected Friend Sub ThrowIfDisposed ()

例外狀況

通訊物件處於 ClosingClosed 狀態中。

通訊物件處於 Faulted 狀態中。

備註

如果通訊物件處於 Created, OpeningOpened 狀態,則不會擲回例外狀況。 一旦針對通訊物件呼叫 Close,就會處置該物件。

適用於