X509Certificate.Dispose 方法

定義

釋放目前 X509Certificate 物件所使用的資源。Releases the resources used by the current X509Certificate object.

多載

Dispose(Boolean)

釋放這個 X509Certificate 使用的所有 Unmanaged 資源,並選擇性地釋放 Managed 資源。Releases all of the unmanaged resources used by this X509Certificate and optionally releases the managed resources.

Dispose()

釋放由 X509Certificate 物件使用的所有資源。Releases all resources used by the current X509Certificate object.

備註

注意

X509Certificate.NET Framework 4.6.NET Framework 4.6開始執行 IDisposable 介面;在舊版的 .NET Framework 中,X509Certificate 類別不會執行此介面,因此 Dispose 方法不存在。X509Certificate implements the IDisposable interface starting with the .NET Framework 4.6.NET Framework 4.6; in previous versions of the .NET Framework, the X509Certificate class does not implement this interface, and therefore the Dispose method does not exist.

Dispose(Boolean)

釋放這個 X509Certificate 使用的所有 Unmanaged 資源,並選擇性地釋放 Managed 資源。Releases all of the unmanaged resources used by this X509Certificate and optionally releases the managed resources.

protected:
 virtual void Dispose(bool disposing);
protected virtual void Dispose (bool disposing);
abstract member Dispose : bool -> unit
override this.Dispose : bool -> unit
Protected Overridable 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.

備註

注意

X509Certificate.NET Framework 4.6.NET Framework 4.6開始執行 IDisposable 介面;在舊版的 .NET Framework 中,X509Certificate 類別不會執行此介面,因此 Dispose 方法不存在。X509Certificate implements the IDisposable interface starting with the .NET Framework 4.6.NET Framework 4.6; in previous versions of the .NET Framework, the X509Certificate class does not implement this interface, and therefore the Dispose method does not exist.

Dispose()

釋放由 X509Certificate 物件使用的所有資源。Releases all resources used by the current X509Certificate object.

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

實作

備註

注意

X509Certificate.NET Framework 4.6.NET Framework 4.6開始執行 IDisposable 介面;在舊版的 .NET Framework 中,X509Certificate 類別不會執行此介面,因此 Dispose 方法不存在。X509Certificate implements the IDisposable interface starting with the .NET Framework 4.6.NET Framework 4.6; in previous versions of the .NET Framework, the X509Certificate class does not implement this interface, and therefore the Dispose method does not exist.

適用於