No, it's not that a private key depends on a public key or visa versa. The two have "equal rights" and are generated at the same time, only used in different ways.
I feel you need some introduction of public-key cryptography and digital signatures:
http://en.wikipedia.org/wiki/Public-key_cryptography[
^],
http://en.wikipedia.org/wiki/Digital_signature[
^].
As to the key generation and other parts of the algorithm, it depends on what kind of algorithm you chose to use.
Any algorithm you may want to use falls into a category of
asymmetric algorithms. See what's available in the standard .NET library:
http://msdn.microsoft.com/en-us/library/system.security.cryptography.asymmetricalgorithm.aspx[
^].
Normally, the key pair is created when you call a constructor of a non-abstract class implementing a concrete algorithm. Please review the help pages on each class based on
System.Security.Cryptography.AsymmetricAlgorithm
to chose the algorithm you need and understand the issues with generating the keys and handling them which is a key (pub unintended) aspect of each of those algorithms.
—SA