I google it from web, find many samples to generate a new x509Certificate2 from a file in .net, but there is no one sample to show how to generate a completely new x509Certi
I think you can't do it using that API. But you can create one using Bouncy Castle (http://www.bouncycastle.org) and later convert that object to a X509Certificate2 object (BC has some utility class for doing that).
-edit- Take a look at these BC classes: X509V3CertificateGenerator and X509Certificate
The BC utility class that later will convert a BC X509Certificate object to a regular X509Certificate2 object is: DotNetUtilities