摘要: (31)Know your loops招数31:认识你的循环for is the fastest way of iterating over a collection, foreach is a little slower, and LINQ queries are slowest.for是遍历集合最快的方法,foreach略慢一些,LINQ查询最慢。测试代码:using System;using System.Collections.Generic;using System.Linq;using System.Text;using System.Data;using System.Diagn 阅读全文
posted @ 2013-08-01 14:13 安布雷拉 阅读(654) 评论(1) 推荐(0) 编辑