我尝试从名称值集合中获取值,并尝试将其存储在字符串数组中
for (int i=0; i<arr.Length; i++)
{
arr[i] = DataRowColl.GetValue[i];
}DataRow.Coll是我的名字赋值集合。它给出了引用没有括号的错误,我可以在字符串数组中从集合中赋值吗??
发布于 2013-05-03 15:34:27
GetValue不是NameValueCollection的成员。该函数名为Get。如果您想使用[]运算符,则不必调用Get函数。所以打电话给
arr[i] = DataRowColl[i];或者:
arr[i] = DataRowColl.Get(i);https://stackoverflow.com/questions/16353710
复制相似问题