OPC Studio User's Guide and Reference
PkiCertificate Constructor(X509Certificate2)



OpcLabs.BaseLib Assembly > OpcLabs.BaseLib.Security.Cryptography.PkiCertificates Namespace > PkiCertificate Class > PkiCertificate Constructor : PkiCertificate Constructor(X509Certificate2)

The value of this parameter cannot be null (Nothing in Visual Basic).

Initializes a new instance of the class using an System.Security.Cryptography.X509Certificates.X509Certificate2 object.
Syntax
'Declaration
 
Public Function New( _
   ByVal certificate2 As X509Certificate2 _
)
'Usage
 
Dim certificate2 As X509Certificate2
 
Dim instance As New PkiCertificate(certificate2)
public PkiCertificate( 
   X509Certificate2 certificate2
)
public:
PkiCertificate( 
   X509Certificate2^ certificate2
)

Parameters

certificate2

The value of this parameter cannot be null (Nothing in Visual Basic).

Exceptions
ExceptionDescription

An error occurred during a cryptographic operation.

This is an operation error that depends on factors external to your program, and thus cannot be always avoided. Your code must handle it appropriately.

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