Sample code for 30+ languages & platforms
C#

Transition from Cert.GetCertChain to Cert.BuildCertChain

Provides instructions for replacing deprecated GetCertChain method calls with BuildCertChain.

Chilkat C# Downloads

C#
bool success = false;

Chilkat.Cert cert = new Chilkat.Cert();

//  ------------------------------------------------------------------------
//  The GetCertChain method is deprecated:

Chilkat.CertChain certchainObj = cert.GetCertChain();
if (cert.LastMethodSuccess == false) {
    Debug.WriteLine(cert.LastErrorText);
    return;
}

//  ...
//  ...

//  ------------------------------------------------------------------------
//  Do the equivalent using BuildCertChain.
//  Your application creates a new, empty CertChain object which is passed 
//  in the last argument and filled upon success.

Chilkat.CertChain certchainOut = new Chilkat.CertChain();
success = cert.BuildCertChain(certchainOut);
if (success == false) {
    Debug.WriteLine(cert.LastErrorText);
    return;
}