title: Using System.Data Instead of System.Data.SqlClient
body: <p>I have a question of how to use <code>System.Data</code> and <code>System.Data.SqlClient</code>. </p>
  
  <p>In the following example I've used <code>System.Data.SqlClient</code> namesspace. Can I write <code>System.Data</code> instead of <code>System.Data.SqlClient</code> here, because SqlClient is <strong>already included</strong> in the <code>System.Data</code> namespace?</p>
  
  <p>My code:</p>
  
  <pre><code>using System;
  using System.Data.SqlClient;
  
  class Program
  {
      static void Main()
      {
      // First access the connection string.
      // ... This may be autogenerated in Visual Studio.
      string connectionString =
                       ConsoleApplication1.Properties.Settings.Default.ConnectionString;
      //
      // In a using statement, acquire the SqlConnection as a resource.
      //
      using (SqlConnection con = new SqlConnection(connectionString))
      {
          //
          // Open the SqlConnection.
          //
          con.Open();
          //
          // The following code uses an SqlCommand based on the SqlConnection.
          //
          using (SqlCommand command = new SqlCommand("SELECT TOP 2 * FROM Dogs1", con))
          using (SqlDataReader reader = command.ExecuteReader())
          {
            while (reader.Read())
            {
              Console.WriteLine("{0} {1} {2}",
              reader.GetInt32(0), reader.GetString(1), reader.GetString(2));
            }
          }
      }
    }
  }
  </code></pre>