X509Certificate.Dispose Method

Definition

Releases the resources used by the current X509Certificate object.

Overloads

Dispose()

Releases all resources used by the current X509Certificate object.

Dispose(Boolean)

Releases all of the unmanaged resources used by this X509Certificate and optionally releases the managed resources.

Remarks

Note

X509Certificate implements the IDisposable interface starting with the .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()

Source:
X509Certificate.cs
Source:
X509Certificate.cs
Source:
X509Certificate.cs

Releases all resources used by the current X509Certificate object.

C#
public void Dispose();

Implements

Remarks

Note

X509Certificate implements the IDisposable interface starting with the .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.

Applies to

.NET 10 and other versions
Product Versions
.NET Core 1.0, Core 1.1, Core 2.0, Core 2.1, Core 2.2, Core 3.0, Core 3.1, 5, 6, 7, 8, 9, 10
.NET Framework 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1
.NET Standard 1.3, 1.4, 1.6, 2.0, 2.1

Dispose(Boolean)

Source:
X509Certificate.cs
Source:
X509Certificate.cs
Source:
X509Certificate.cs

Releases all of the unmanaged resources used by this X509Certificate and optionally releases the managed resources.

C#
protected virtual void Dispose(bool disposing);

Parameters

disposing
Boolean

true to release both managed and unmanaged resources; false to release only unmanaged resources.

Remarks

Note

X509Certificate implements the IDisposable interface starting with the .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.

Applies to

.NET 10 and other versions
Product Versions
.NET Core 1.0, Core 1.1, Core 2.0, Core 2.1, Core 2.2, Core 3.0, Core 3.1, 5, 6, 7, 8, 9, 10
.NET Framework 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1
.NET Standard 1.3, 1.4, 1.6, 2.0, 2.1