X509Certificate2Collection.RemoveRange Method (X509Certificate2[])


The .NET API Reference documentation has a new home. Visit the .NET API Browser on docs.microsoft.com to see the new experience.

Removes multiple X509Certificate2 objects in an array from an X509Certificate2Collection object.

Namespace:   System.Security.Cryptography.X509Certificates
Assembly:  System (in System.dll)

public void RemoveRange(
	X509Certificate2[] certificates


Type: System.Security.Cryptography.X509Certificates.X509Certificate2[]

An array of X509Certificate2 objects.

Exception Condition

certificates is null.

Use this method if you have an array of X509Certificate2 objects to remove from an X509Certificate2Collection object. The AddRange and RemoveRange methods process requests transactionally, so that if a single add or remove fails, the entire operation is aborted.

.NET Framework
Available since 2.0
Return to top