Control.IsDisposed 屬性

定義

取得指示控制項是否已經處置的值。Gets a value indicating whether the control has been disposed of.

public:
 property bool IsDisposed { bool get(); };
[System.ComponentModel.Browsable(false)]
public bool IsDisposed { get; }
member this.IsDisposed : bool
Public ReadOnly Property IsDisposed As Boolean

屬性值

如果控制項已經處置,則為 true,否則為 falsetrue if the control has been disposed of; otherwise, false.

屬性

備註

當這個屬性傳回 true 時,控制項會處置,而且無法再當做有效的 Windows 控制項參考。When this property returns true, the control is disposed of and can no longer be referenced as a valid Windows control. 即使控制項的實例已經處置,它仍會保留在記憶體中,直到透過垃圾收集從記憶體中移除為止。Even though the instance of a control is disposed of, it is still maintained in memory until it is removed from memory through garbage collection. 處置控制項時,您無法呼叫其 RecreateHandle 方法。When a control is disposed, you cannot call its RecreateHandle method.

適用於

另請參閱