Control.Disposing 屬性

定義

取得值,指出基底 Control 類別是否正在處置的過程中。Gets a value indicating whether the base Control class is in the process of disposing.

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

屬性值

如果基底 Control 類別正在處置的過程中,則為 true,否則為 falsetrue if the base Control class is in the process of disposing; otherwise, false.

屬性

備註

當這個屬性傳回 true時,基底 Control 類別正在處置的過程中。When this property returns true, the base Control class is in the process of disposing. 處置控制項之後,就無法再將它當做有效的 Windows 控制項來參考。After the control is disposed of, it 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 of, you cannot call its RecreateHandle method.

適用於

另請參閱