ADO Net C# Tutorial

using System;
using System.Data;
using System.Data.OracleClient;
class Class1{
    static void Main(string[] args)
    {
      string connstr = "User Id=scott; Password=tiger; Data Source=oranet";
      OracleConnection con = new OracleConnection();
      con.ConnectionString = connstr;
      Console.WriteLine("Connection String 1: {0}", con.ConnectionString);
      con.Open();
      Console.WriteLine("Connection String 2: {0}", con.ConnectionString);
      con.Close();
      Console.WriteLine("Connection String 3: {0}", con.ConnectionString);
      con.Dispose();
    }
}