孤独的猫

  博客园 :: 首页 :: 博问 :: 闪存 :: 新随笔 :: 联系 :: 订阅 订阅 :: 管理 ::
using System;
using System.Linq;
using System.Collections.Generic;

class Exapmple1_1
{
    static void Main()
    {
        string[] names={"Burke","Connor","Frank",
            "Everett","Albert","George"};      
        IEnumerable<string> expr = from s in names
                                   where s.Length == 5
                                   orderby s
                                   select s.ToUpper();
        foreach (string item in expr)
        {
            Console.WriteLine(item);
        }
        string s1 = Console.ReadLine();
    }
}
posted on 2011-05-05 21:05  孤独的猫  阅读(175)  评论(0)    收藏  举报