title: C# IDisposable Using: Best Practice
body: <p>I have been wrapping my OracleConnection and OracleCommand objects in USING statements for a while now, however, after running code analyzer I discover that OracleParameter also implements IDisposable.  Is the following code correct?  Is there a better technique for readability or structure?  At first glance it just seems to be cluttered with USING statements:</p>
  
  <pre><code>using (OracleConnection conn = new OracleConnection(connectionstring))
  {
      conn.Open();
      using (OracleCommand cmd = new OracleCommand(sql, conn))
      {
          cmd.BindByName = true;
  
          using (OracleParameter param1 = new OracleParameter("p1", OracleDbType.Int32, System.Data.ParameterDirection.Input))
          {
              param1.Value = int.Parse(value1);
              cmd.Parameters.Add(param1);
          }
  
          using (OracleParameter param2 = new OracleParameter("p2", OracleDbType.Varchar2, System.Data.ParameterDirection.Input))
          {
              param2.Value = value2;
              cmd.Parameters.Add(param2);
          }
  
          using (OracleDataReader dr = cmd.ExecuteReader())
          {
              // loop data here...
          }
      }
  }
  </code></pre>