摘要:
区别:for 你先要给初值,末值和步长foreach 不需要事先给定初值,末值和步长,他是自动遍历给定的集合体的所有值string[] a=new string[]{"a","b"}for(i=0;i<a.length;i++){Response.write(a[i].ToString())}foreach(string b in a){Response.write b} 阅读全文
posted @ 2013-04-17 09:43
黑咖啡1
阅读(434)
评论(0)
推荐(0)
2013年4月17日