2012年3月5日

重视Linq技术_7

摘要: Projecting - Select//1、Select-Subqueries and Object Hierarchiesstring sampleDirectory = Environment.GetFolderPath (Environment.SpecialFolder.MyDocuments); DirectoryInfo[] dirs = new DirectoryInfo (sampleDirectory).GetDirectories(); var query = from d in dirs where (d.Attributes & FileAttributes. 阅读全文

posted @ 2012-03-05 21:56 Sanic 阅读(258) 评论(0) 推荐(0) 编辑

重视Linq技术_6

摘要: Filtering//1、Simple Local Filterstring[] names = { "Tom", "Dick", "Harry", "Mary", "Jay" }; IEnumerable<string> query = names.Where (name => name.EndsWith ("y")); query.Dump ("In lambda syntax"); query = from n in names w 阅读全文

posted @ 2012-03-05 21:00 Sanic 阅读(209) 评论(0) 推荐(0) 编辑

导航