System.Security.Cryptography.X509Certificates.X509Certificate2Collection.Find Method

Searches an System.Security.Cryptography.X509Certificates.X509Certificate2Collection object using the search criteria specified by the System.Security.Cryptography.X509Certificates.X509FindType enumeration and the findValue object.

Syntax

[System.MonoTODO("Does not support X509FindType.FindByTemplateName, FindByApplicationPolicy and FindByCertificatePolicy")]
public X509Certificate2Collection Find (X509FindType findType, object findValue, bool validOnly)

Parameters

findType
One of the System.Security.Cryptography.X509Certificates.X509FindType values.
findValue
The search criteria as an object.
validOnly
true to allow only valid certificates to be returned from the search; otherwise, false.

Returns

An System.Security.Cryptography.X509Certificates.X509Certificate2Collection object.

Remarks

Use this method to find System.Security.Cryptography.X509Certificates.X509Certificate2 objects if no user interaction is needed. Use the X509Certificate2Collection.Find(X509FindType, object, bool) method to allow the user to select System.Security.Cryptography.X509Certificates.X509Certificate2 objects.

Note that this method can be used in a cascading or nested style, narrowing the search criteria with each call to the method.

Requirements

Namespace: System.Security.Cryptography.X509Certificates
Assembly: System (in System.dll)
Assembly Versions: 2.0.0.0, 4.0.0.0
Since: .NET 2.0