title: Error : The SqlParameterCollection only accepts non-null SqlParameter type objects, not String objects
body: <pre><code>public int set(string procName , object[] param)
  {
        SqlConnection conn = new SqlConnection(constr);
        conn.Open();
  
        SqlCommand cmd = new SqlCommand(procName,conn);
        cmd.CommandType = CommandType.StoredProcedure;
  
        foreach(object o in param)
        {
           cmd.Parameters.Add(o);      // Error
        }
        int res = cmd.ExecuteNonQuery();
        conn.Close();
        return res;
  }
  </code></pre>
  
  <p>The values are correctly passed via the calling function... The 2nd parameter of the function 'set' contains 2 string values.</p>
  
  <p>Even at the ERROR statment the 'o' contains the first value "Computer" but represent ERROR as stated above.</p>