Get Client in Mongo Db

Introduction

This blog contains an example of get client reference in Mongo Db using C#.
string connectionString = "mongodb://172.16.1.24:27017";
try
{
Console.WriteLine("Creating Client..........");
MongoClient client = null;
client = new MongoClient(connectionString);
Console.WriteLine("Client Created Successfuly........");
Console.WriteLine("Client: " + client.ToString());
}
catch (Exception ex)
{
Console.WriteLine("Filed to Create Client.......");
Console.WriteLine(ex.Message);
}