C# Just want 入门

时间:2022-10-15 09:39:08

1. 终于明白为什么以前的程序在结尾部分会经常出现 input any key to exit!

using System;

namespace ConsoleApplication1
{
class Concat
{
static void Main()
{
Console.WriteLine("Hello,world");
String s1, s2, result;
s1 = Console.ReadLine();
s2 = Console.ReadLine();
result = s1 + s2;
Console.WriteLine("{0} + {1} = {2}",s1,s2,result);
Console.WriteLine("input anykey to exit!");
s2 = Console.ReadLine();
}
}
}