title: Call stored procedure in C#
body: <p>I want to call the stored procedure using C#.</p>
  
  <p>I would like to create a shorthand for the procedure call.</p>
  
  <p>I still do not want to re-define the connection and open it.
  How do I create a method - I still did not open connection to the database?</p>
  
  <p>I use the following code:</p>
  
  <pre><code>SqlConnection conn = null;
  SqlDataReader rdr  = null;
  
  conn = new SqlConnection("");
  conn.Open();
  
  SqlCommand cmd  = new SqlCommand("Procedure", conn);
  cmd.CommandType = CommandType.StoredProcedure;
  
  rdr = cmd.ExecuteReader();
  
  while (rdr.Read())
  {
  }
  </code></pre>