Returns the first certificate in this collection that matches name by CN

Namespace: NHINDirect.Certificates
Assembly: nhinCommon (in nhinCommon.dll) Version: 1.0.0.0 (1.0.0.0)

Syntax

C#
public static X509Certificate2 FindByName(
	this X509Certificate2Collection certs,
	string name
)
Visual Basic
<ExtensionAttribute> _
Public Shared Function FindByName ( _
	certs As X509Certificate2Collection, _
	name As String _
) As X509Certificate2
Visual C++
[ExtensionAttribute]
public:
static X509Certificate2^ FindByName(
	X509Certificate2Collection^ certs, 
	String^ name
)

Parameters

certs
Type: System.Security.Cryptography.X509Certificates..::..X509Certificate2Collection
The certificates to search
name
Type: System..::..String
The name value to test against the CN

Return Value

The first matching element, or null if no matching elements are found.

See Also