From smart card point of view, a X.509 certificate is just a binary file, but one needs to find and address the correct file, a functionality provided by the PKCS#11 support for the card.
While the following link is for a thin python layer on top of pkcs #11, the last example may serve as starting point for C# also.