X509Certificate Constructor (Byte[])
[ This article is for Windows Phone 8 developers. If you’re developing for Windows 10, see the latest documentation. ]
Initializes a new instance of the X509Certificate class defined from a sequence of bytes representing an X.509 version 3 certificate.
Assembly: mscorlib (in mscorlib.dll)
Parameters
- data
- Type:
System.Byte
[]
A byte array containing data from an X.509 certificate.
| Exception | Condition |
|---|---|
| CryptographicException | An error with the certificate occurs. For example:
|
| ArgumentException | The rawData parameter is null. -or- The length of the rawData parameter is 0. |
ASN.1 DER is the only certificate format supported by this class.
If you create an X509Certificate certificate by specifying a PKCS7 signed file store for data, the X509Certificate is created for the certificate that signed the store instead of the certificates within the store.