【发布时间】:2014-04-13 12:54:39
【问题描述】:
我想知道如何将变量添加到特定的列表索引。举个例子吧。。
int a = 4;
List<int> listB = new List<int>();
for(int i = 0; i < 10, i++)
{
if (a == i)
{
listB.(something like add to index, this is the part I dont know what to do, my guess would be listB.AddToIndex(a, a) for adding variable a to index a in the list.)
}
}
希望我的解释可以理解,提前谢谢。
【问题讨论】:
-
这个问题似乎离题了,因为它没有显示任何研究工作。