当我编程用的DataRow数组prarameter一个功能,它提示“),”与该行private Dictionary<int,string> getViewColumnHeaderName(DataRow DR[]),
想到这是我的代码:为什么C#不能传递数组参数?
private Dictionary<int,string> getViewColumnHeaderName(DataRow DR[])
{
System.Collections.Generic.Dictionary<int, string> dic=new System.Collections.Generic.Dictionary<int, string>();
for(int i=0;i<DR[0].Table.Columns.Count;i++)
{
dic.Add(i,DR[0].Table.Columns[i].ColumnName.ToString());
}
return dic;
}
当我打勾的[],该程序可以运行正常,但我只想给参数一个数组,如何解决它?