哪个代码段可以提供更好的性能?以下代码段是用C#编写的。
1。
for(int counter=0; counter<list.Count; counter++)
{
list[counter].DoSomething();
}
2。
foreach(MyType current in list)
current.DoSomething();
慕桂英3389331
烙印99
相关分类