C#入门之VS2015的Helloworld输出
1.环境配置
注意截图里面的1,2,3顺序
2.程序编写
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace Case1
{
class Program
{
/*
static void Main(string[] args) // hello world
{
string message; // 字符串
message = "Hello world!";
System.Console.WriteLine(message);
System.Console.ReadKey();
}
*/
static void Main(string[] args) // 从键盘获得输入
{
string message; // 字符串
message = System.Console.ReadLine();
System.Console.WriteLine("我的输入是:"+message);
System.Console.ReadKey();
}
}
}