X509Certificate2::GetCertContentType Method (String^)

 

Indicates the type of certificate contained in a file.

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

public:
static X509ContentType GetCertContentType(
	String^ fileName
)

Parameters

fileName
Type: System::String^

The name of a certificate file.

Exception Condition
ArgumentNullException

fileName is null.

This method enables you to discover the type of certificate in a file.

FileIOPermission

for reading the certificate. Security action: Demand. Associated enumeration: FileAccess::Read

.NET Framework
Available since 2.0
Return to top
Show: