title: How can I retrieve a list of parameters from a stored procedure in SQL Server
body: <p>Using C# and System.Data.SqlClient, is there a way to retrieve a list of parameters that belong to a stored procedure on a SQL Server before I actually execute it?</p>
  
  <p>I have an a "multi-environment" scenario where there are multiple versions of the same database schema. Examples of environments might be "Development", "Staging", &amp; "Production". "Development" is going to have one version of the stored procedure and "Staging" is going to have another.</p>
  
  <p>All I want to do is validate that a parameter is going to be there before passing it a value and calling the stored procedure. Avoiding that SqlException rather than having to catch it is a plus for me.</p>
  
  <p>Joshua</p>