Is there a way to extract public key from private key in c#? Becouse if i do ToXMLString()
then i can set if i want public key information saved with the privat
If you can save it, and include the private key, then what you're saving is not just the private key.
However, if you really do have only the private key, then no, you can't "extract" the public key from it. If you could do that, you would render most of todays security obsolete.
So basically, I don't believe you have only the private key, you have a key pair, and you should be able to extract the public key from that.
Whether that is easily doable in C# or .NET, I have no idea.