using( SqlConnection conn = new SqlConnection("CONNECTION_STRING_HERE") )
{
try
{
conn.Open();
//Perform DB operation here i.e. any CRUD operation
}
catch (Exception ex)
{
//Handle exception, perhaps log it and do the needful
}
} //Connection will autmatically be closed here always