I want to use something similar like this:
using (DataSet ds = new DataSet())
{
SqlParameter[] dbParams = new SqlParameter[]
{
If you know the maximum number of items (instanses of SQLParameter type) then following approach is ideal. Else you can go with List approach, which is briefed by peers.
var dbParams = new SqlParameter[2];
dbParams.SetValue(new SqlParameter("@PromptID", promptID),0);
dbParams.SetValue(new SqlParameter("@ScenarioID", scenarioID), scenarioID != 0 ? 1 : 0);