The following is a simple C# application that connects to Oracle Database and displays its version number before disconnecting:
// C# using System; using Oracle.DataAccess.Client; class Sample { static void Main() { // Connect to Oracle string constr = "User Id=scott;Password=tiger;Data Source=oracle"; OracleConnection con = new OracleConnection(constr); con.Open(); // Display Version Number Console.WriteLine("Connected to Oracle " + con.ServerVersion); // Close and Dispose OracleConnection con.Close(); con.Dispose(); } }