Sample code for 30+ languages & platforms
C#

Transition from Cert.GetValidToDt to Cert.ValidToStr

Provides instructions for replacing deprecated GetValidToDt method calls with ValidToStr.

Chilkat C# Downloads

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

//  ------------------------------------------------------------------------
//  The GetValidToDt method is deprecated:

Chilkat.CkDateTime ckdt1 = cert.GetValidToDt();
if (cert.LastMethodSuccess == false) {
    Debug.WriteLine(cert.LastErrorText);
    return;
}

//  ...
//  ...

//  ------------------------------------------------------------------------
//  Do the equivalent using the ValidToStr property

Chilkat.CkDateTime ckdt2 = new Chilkat.CkDateTime();
ckdt2.SetFromRfc822(cert.ValidToStr);