我如何多线程将所有元素添加到哈希表集合的这个简单操作?
foreach (var x in listx) //List of x
{
String temp1 = x.sc;
String temp2 = x.key;
Nullable<int> temp3 = x.val;
if ((null != temp2) && (string.Empty != temp2) && (int.MinValue != temp3) && "Fetch" == temp1)
{
if (false == htTempVal.ContainsKey(temp2.Trim()))
htTempVal.Add(temp2.Trim(), temp3);
}
}