ADO Net C# Tutorial

using System;
using System.Data.OracleClient;
  class Class1
  {
    [STAThread]
    static void Main(string[] args)
    {
      String connString = "User Id=oranetuser;Password=demo;Data Source=oranet";
      OracleConnection oraConnection = new OracleConnection(connString);
        oraConnection.Open();
        Console.WriteLine("Connection String: ");
        Console.WriteLine(oraConnection.ConnectionString.ToString() + "\n");
        Console.WriteLine("Current Connection State: ");
        Console.WriteLine(oraConnection.State.ToString() + "\n");
        Console.WriteLine("Oracle Database Server Version: ");
        Console.WriteLine(oraConnection.ServerVersion.ToString());
    }
  }