I'm a bit confused what you're trying to achieve here. You have the following line:
SSLCert objSSLCert = new SSLCert();
and then you try to set the value in txtDisplay.Text here:
objSSLCert.txtDisplay.Text = "\n" + x509.Issuer.ToString();
Is this meant to be a form? If so, unless your constructor is initializing txtDisplay, it would look like that's your problem -
txtDisplay
is null, so you can't set the
Text
property as there is no instance. Set a breakpoint on this line and inspect
objSSLCert
to see what is in there.