C# 中foreach语句的实质

一:foreach语句

foreach(Product p in result){

}
内部实际执行的代码为
IEnumerator itor=result.GetEnumerator()
while(itor.MoveNext())
{
...
}
posted @ 2009-05-14 19:24  yifan  阅读(211)  评论(0)    收藏  举报