title: When executing a stored procedure, what is the benefit of using CommandType.StoredProcedure versus using CommandType.Text?
body: <p>So in C# to use a stored procedure I have code like the following (connection code omitted):</p>
  
  <pre><code> string sql = "GetClientDefaults";
  
   SqlCommand cmd = new SqlCommand(sql);
   cmd.CommandType = CommandType.StoredProcedure;    //&lt;-- DO I NEED THIS??
   cmd.Parameters.AddWithValue("@computerName", computerName);
  </code></pre>
  
  <p>Where sql is the name of a stored procedure.  Now, this code seems to work just fine with and without the commented line.  </p>
  
  <p>So, do I need this line?  Is there some performance (or other) benefit to setting this?  Is there a benefit to NOT setting it or setting it to Text?</p>