X509Certificate2.GetCertContentType Method (String)

 
System_CAPS_noteNote

The .NET API Reference documentation has a new home. Visit the .NET API Browser on docs.microsoft.com to see the new experience.

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: