Windows apps
Collapse the table of content
Expand the table of content

Find Method

[This documentation is for preview only, and is subject to change in later releases. Blank topics are included as placeholders.]

Searches an X509Certificate2Collection object using the search criteria specified by the X509FindType enumeration and the findValue object.

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

public:
X509Certificate2Collection^ Find(
	X509FindType findType, 
	Object^ findValue, 
	bool validOnly
)

Parameters

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

ExceptionCondition
CryptographicException

findType is invalid.

Use this method to find X509Certificate2 objects if no user interaction is needed. Use the Find method to allow the user to select 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.

Show:
© 2017 Microsoft