亚洲乱码中文字幕综合,中国熟女仑乱hd,亚洲精品乱拍国产一区二区三区,一本大道卡一卡二卡三乱码全集资源,又粗又黄又硬又爽的免费视频

C#使用linq查詢大數(shù)據(jù)集的方法

 更新時間:2015年04月02日 09:56:30   作者:令狐不聰  
這篇文章主要介紹了C#使用linq查詢大數(shù)據(jù)集的方法,涉及C#調(diào)用linq進行數(shù)據(jù)查詢的技巧,具有一定參考借鑒價值,需要的朋友可以參考下

本文實例講述了C#使用linq查詢大數(shù)據(jù)集的方法。分享給大家供大家參考。具體如下:

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace LargeNumberQuery
{
  class Program
  {
    static void Main(string[] args)
    {
      int[] numbers = CreateNumbers(7384738);
      Console.WriteLine("Numbers less than 2000:");
      var queryResults =
        from n in numbers
        where n < 2000
        select n;   
      foreach (var item in queryResults)
      {
        Console.WriteLine(item);
      }
      Console.ReadLine();
    }
    private static int[] CreateNumbers(int count)
    {
      Random generator = new Random(0);
      int[] result = new int[count];
      for (int i = 0; i < count; i++)
      {
        result[i] = generator.Next();
      }
      return result;
    }
  }
}

希望本文所述對大家的C#程序設(shè)計有所幫助。

相關(guān)文章

最新評論