using System;
using System.Data.SqlClient;
public class ConnectionTest
{
public static void Main()
{
SqlConnection con = new SqlConnection("Data Source=localhost;Initial Catalog=Northwind;Integrated Security=SSPI");
con.Open();
Console.WriteLine("Connection is " + con.State.ToString());
con.Close();
Console.WriteLine("Connection is " + con.State.ToString());
}
}