【转】趣味题:"Hello,world"的输出

要求:在if后的()内填写内容,使得输出结果为"Hello,world"

解答:

C#代码
 1 /// <summary>
 2 /// 要求:在if后的()内填写内容,使得输出结果为"Hello,world"
 3 /// </summary>
 4 /// <param name="args"></param>
 5 static void Main(string[] args)
 6 {
 7     // Main(null)是表达式,自然不是object(System.Object的别名)
 8     if (args == null || Main(nullis object)
 9     {
10         Console.Write("Hello,");
11     }
12     else
13     {
14         Console.Write("world");
15     }
16 }

 

 

posted @ 2010-11-09 14:45  temptation  阅读(265)  评论(0编辑  收藏  举报