MBindingCollection.Dispose 方法

定義

釋放 MBindingCollection 所使用的 Unmanaged 資源,並選擇性地釋放 Managed 資源。Releases the unmanaged resources that are used by a MBindingCollection and optionally releases the managed resources.

多載

Dispose()

釋放 MBindingCollection 所使用的 Unmanaged 資源。Releases the unmanaged resources that are used by a MBindingCollection.

Dispose(Boolean)

釋放 MBindingCollection 所使用的 Unmanaged 資源,並選擇性地釋放 Managed 資源。Releases the unmanaged resources that are used by a MBindingCollection and optionally releases the managed resources.

Dispose()

釋放 MBindingCollection 所使用的 Unmanaged 資源。Releases the unmanaged resources that are used by a MBindingCollection.

public:
 virtual void Dispose() = IDisposable::Dispose;
public void Dispose ();
abstract member Dispose : unit -> unit
override this.Dispose : unit -> unit
Public Sub Dispose ()

實作

備註

這個方法是由公用 Dispose() 方法和 Finalize 方法所呼叫。This method is called by the public Dispose() method and the Finalize method.

注意

Microsoft.VisualBasic.Compatibility.VB6 命名空間中的函式和物件都是供這些工具使用,以便從 Visual Basic 6.0 升級至 Visual Basic。Functions and objects in the Microsoft.VisualBasic.Compatibility.VB6 namespace are provided for use by the tools for upgrading from Visual Basic 6.0 to Visual Basic. 在大多數情況下,這些函式和物件會複製在 .NET Framework.NET Framework 的其他命名空間中可以找到的功能。In most cases, these functions and objects duplicate functionality that you can find in other namespaces in the .NET Framework.NET Framework. 只有當 Visual Basic 6.0 程式碼模型與 .NET Framework.NET Framework 實作有顯著差異時,才需要這些項目。They are necessary only when the Visual Basic 6.0 code model differs significantly from the .NET Framework.NET Framework implementation.

Dispose(Boolean)

釋放 MBindingCollection 所使用的 Unmanaged 資源,並選擇性地釋放 Managed 資源。Releases the unmanaged resources that are used by a MBindingCollection and optionally releases the managed resources.

protected:
 void Dispose(bool disposing);
protected void Dispose (bool disposing);
member this.Dispose : bool -> unit
Protected Sub Dispose (disposing As Boolean)

參數

disposing
Boolean

true 表示釋放 Managed 和 Unmanaged 資源,false 則表示只釋放 Unmanaged 資源。true to release both managed and unmanaged resources; false to release only unmanaged resources.

備註

這個方法是由公用 Dispose() 方法和 Finalize 方法所呼叫。This method is called by the public Dispose() method and the Finalize method. Dispose() 會叫用受保護的 Dispose(Boolean) 方法,並將處置參數設定為 trueDispose() invokes the protected Dispose(Boolean) method with the disposing parameter set to true. Finalize 會叫用處置參數設定為 falseDisposeFinalize invokes Dispose with the disposing parameter set to false.

true處置參數時,這個方法會釋放此控制項所參考之任何 managed 物件所持有的所有資源。When the disposing parameter is true, this method releases all resources held by any managed objects that this control references. 這個方法會叫用每個參考物件的 Dispose() 方法。This method invokes the Dispose() method of each referenced object.

注意

Microsoft.VisualBasic.Compatibility.VB6 命名空間中的函式和物件都是供這些工具使用,以便從 Visual Basic 6.0 升級至 Visual Basic。Functions and objects in the Microsoft.VisualBasic.Compatibility.VB6 namespace are provided for use by the tools for upgrading from Visual Basic 6.0 to Visual Basic. 在大多數情況下,這些函式和物件會複製在 .NET Framework.NET Framework 的其他命名空間中可以找到的功能。In most cases, these functions and objects duplicate functionality that you can find in other namespaces in the .NET Framework.NET Framework. 只有當 Visual Basic 6.0 程式碼模型與 .NET Framework.NET Framework 實作有顯著差異時,才需要這些項目。They are necessary only when the Visual Basic 6.0 code model differs significantly from the .NET Framework.NET Framework implementation.

適用於