title: What's the best method to pass parameters to SQLCommand?
body: <p>What's the best method to pass parameters to SQLCommand? You can do:</p>
  
  <pre><code>cmd.Parameters.Add("@Name", SqlDbType.VarChar, 20).Value = "Bob";
  </code></pre>
  
  <p>or</p>
  
  <pre><code>cmd.Parameters.Add("@Name", SqlDbType.VarChar).Value = "Bob";
  </code></pre>
  
  <p>or</p>
  
  <pre><code>cmd.Parameters.Add("@Name").Value = "Bob";
  </code></pre>
  
  <p>It seems like the first one might be somehow "better" either performance-wise or error checking-wise. But I would like to know more definitively.</p>