作者:VB.NET开发
项目:System.Security.Cryptography.X509Certificate
' 导入命名空间
Imports System.Security.Cryptography.X509Certificates
Public Class X509
Public Shared Sub Main()
' The path to the certificate.
Dim Certificate As String = "Certificate.cer"
' Load the certificate into an X509Certificate object.
Dim cert As X509Certificate = X509Certificate.CreateFromCertFile(Certificate)
' Get the value.
Dim results As Byte() = cert.GetSerialNumber()
' Display the value to the console.
Dim b As Byte
For Each b In results
Console.Write(b)
Next b
End Sub
End Class