X509Certificate.GetSerialNumber Method

[ This article is for Windows Phone 8 developers. If you’re developing for Windows 10, see the latest documentation. ]

Returns the serial number of the X.509 version 3 certificate.

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

Syntax

Public Overridable Function GetSerialNumber As Byte()
public virtual byte[] GetSerialNumber()

Return Value

Type: array<System..::.Byte>[]()[]
The serial number of the X.509 certificate as an array of bytes.

Exceptions

Exception Condition
CryptographicException

The certificate context is invalid.

Version Information

Windows Phone OS

Supported in: 8.1, 8.0, 7.1, 7.0

Platforms

Windows Phone

See Also

Reference

X509Certificate Class

System.Security.Cryptography.X509Certificates Namespace