Hashtable ht = new Hashtable();
System.Data.SqlClient.SqlParameterCollection sp = new System.Data.SqlClient.SqlParameterCollection();
foreach (DictionaryEntry de in ht)
{
sp.Add(new System.Data.SqlClient.SqlParameter()
{
ParameterName = de.Key.ToString(),
Value = de.Value,
SqlDbType = SqlDbType.Int,
Size = 4
});
}
遍历hashtable,然后创建sqlparameter对象