title: SQL Server stored procedure that returns a boolean if table exists, c# implementation
body: <p>I have created a stored procedure that takes a single argument, the name of a table, and returns 1 if it exists in the database, 0 if it does not. In SQL Server Management Studio testing my stored procedure works exactly as I'd like it to, however I'm having trouble getting that value for use in my C# program.</p>
  
  <p>My options seem to be <code>ExecuteScalar()</code>, <code>ExecuteNonQuery()</code> or <code>ExecuteReader()</code>, none of which seem appropriate for the task, nor can I get them to even retrieve my stored procedure's result.</p>
  
  <p>I have tried assigning my parameter with both <code>cmd.Parameters.AddWithValue</code> and <code>cmd.Parameters.Add</code> again to no avail.</p>