要求:在if后的()内填写内容,使得输出结果为"Hello,world"
解答:
![](https://i-blog.csdnimg.cn/blog_migrate/8f900a89c6347c561fdf2122f13be562.gif)
![ExpandedBlockStart.gif](https://i-blog.csdnimg.cn/blog_migrate/961ddebeb323a10fe0623af514929fc1.gif)
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( null ) is object )
9 {
10 Console.Write( " Hello, " );
11 }
12 else
13 {
14 Console.Write( " world " );
15 }
16 }
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( null ) is object )
9 {
10 Console.Write( " Hello, " );
11 }
12 else
13 {
14 Console.Write( " world " );
15 }
16 }