摘要: 以往我们都是肯定绞尽脑汁,肯定什么循环,元素大小,什么因素都考虑进去。但是现在采用Linq可以很好的解决这个问题。找出两个或多个数组的相同项。代码相当简单:代码 阅读全文
posted @ 2010-10-29 00:13 贰叁事 阅读(1621) 评论(0) 推荐(0)
摘要: 以下代码均来自微软官网/// <summary>/// This sample uses Take to get only the first 3 elements of the array./// </summary>public void Linq1(){ int[] numbers = { 5, 4, 1, 3, 9, 8, 6, 7, 2, 0 }; var fir... 阅读全文
posted @ 2010-10-29 00:12 贰叁事 阅读(1416) 评论(3) 推荐(2)