ServerAddress ServerAddress=new ServerAddress (ip_address, Integer. The parseInt (port));
List
Addrs. Add (serverAddress);
//MongoCredential createScramSha1Credential () three parameters respectively user name password database name
MongoCredential credential=MongoCredential. CreateScramSha1Credential (user_name, database password. ToCharArray ());
List
Credentials. The add (the credential);
//by connecting certification for directing a connection
MongoClient MongoClient=new MongoClient (addrs, credentials);
//to connect to the database
MongoDatabase MongoDatabase=mongoClient. GetDatabase (database);
MongoDatabase. CreateCollection (" test ");
Can't throw an exception, to the perception of the front-end not exception, does anyone know how to get the exception information?