X509Certificate2ExtensionsGetCertificateContextProperty Method

Gets a specified certificate context property.

Definition

Namespace: SysadminsLV.PKI.Cryptography.X509Certificates
Assembly: SysadminsLV.PKI.Win (in SysadminsLV.PKI.Win.dll) Version: 4.0.1.0 (4.0.1.0)
C#
public static X509CertificateContextProperty GetCertificateContextProperty(
	this X509Certificate2 cert,
	X509CertificatePropertyType propID
)

Parameters

cert  X509Certificate2
Certificate.
propID  X509CertificatePropertyType
Property ID to retrieve.

Return Value

X509CertificateContextProperty
Specified certificate context property.

Usage Note

In Visual Basic and C#, you can call this method as an instance method on any object of type X509Certificate2. When you use instance method syntax to call this method, omit the first parameter. For more information, see Extension Methods (Visual Basic) or Extension Methods (C# Programming Guide).

Exceptions

ArgumentNullExceptioncert parameter is null reference.
UninitializedObjectException Certificate object is not initialized and is empty.
Exception Requested context property is not found for the current certificate object.

See Also