OPC Studio User's Guide and Reference
GetSerialNumberByteArray Method (_PkiCertificate)



OpcLabs.BaseLib Assembly > OpcLabs.BaseLib.Security.Cryptography.PkiCertificates.ComTypes Namespace > _PkiCertificate Interface : GetSerialNumberByteArray Method
Same as System.Security.Cryptography.X509Certificates.X509Certificate.GetSerialNumber. Returns the serial number of the PKI certificate as an array of bytes in little-endian order.
Syntax
'Declaration
 
<ElementsNotNullAttribute()>
<NotNullAttribute()>
Function GetSerialNumberByteArray() As Object()
'Usage
 
Dim instance As _PkiCertificate
Dim value() As Object
 
value = instance.GetSerialNumberByteArray()
[ElementsNotNull()]
[NotNull()]
object[] GetSerialNumberByteArray()
[ElementsNotNull()]
[NotNull()]
array<Object^>^ GetSerialNumberByteArray(); 

Return Value

The serial number of the PKI certificate as an array of bytes in little-endian order.
Remarks

This method has been introduced as an alternative way to achieve the functionality of System.Security.Cryptography.X509Certificates.X509Certificate.GetSerialNumber for some COM consumers (such as Microsoft C++ native COM support #import), where the automatically generated getter function for the System.Security.Cryptography.X509Certificates.X509Certificate2.SerialNumber property becomes GetSerialNumber, causing a conflict.

Requirements

Target Platforms: .NET Framework: Windows 10 (selected versions), Windows 11 (selected versions), Windows Server 2016, Windows Server 2022; .NET: Linux, macOS, Microsoft Windows

See Also