Did you try anything besides MSDN?
I found this article:
Elliptic Curve Diffie-Hellman[
^] as the first result in a google search of ".NET Diffie-Hellman.
It looks like it shows you what you're asking.
[Response]
The .Net implementation doesn't appear to directly expose the g an p values, and it doesn't appear that they can be set either. Though you can pass a CngKey
To do a key exchange, you simply pass each other's PublicKey value.
If you want a true implementation, you may want to look at third-party dlls, such as Chilkat which allows for p and g.