EasyText, EasyLicense 的作者, https://github.com/EasyHelper Good Good Study,Day Day Up.

 

你知道这段代码的输出吗?

在msdn 上看到的文章 Quick Puzzle: what does this program print?

 

你知道这段代码的输出吗?

    class Hello
    {
        Type Unknown { get { return World.GetType(); } }
        object[] Knowledge() { return Unknown.GetProperties(); }
        string[] Library()
        {
            return Array.ConvertAll<object, string>(
                Knowledge(),
                delegate(object x) { return x.ToString(); });
        }
        public static Hello World { get { return new Hello(); } }
        public static void Main(string[] args)
        {
            if (args.Length > 0)
                Console.WriteLine(args[0]);
            else
                Main(World.Library());
        }
    }

答案

 



posted @ 2011-10-20 06:34  LoveJenny  阅读(1481)  评论(2编辑  收藏  举报
EasyText, EasyLicense 的作者, https://github.com/EasyHelper Good Good Study,Day Day Up.