hello.cs
上传用户:sflyled
上传日期:2013-01-18
资源大小:1760k
文件大小:0k
源码类别:

.net编程

开发平台:

C#

  1. using System;  //引用了一个叫System的名空间
  2. class easyInput  //类的名字与文件名不同也无所谓
  3. {
  4. public static void Main()
  5. {
  6. string strName;  //声明一个string类型的值变量
  7. Console.Write("please input your name:");  //输出一句话,但不换行
  8. strName = Console.ReadLine();  //从键盘读入用户的输入,回车表示输入结束
  9. Console.WriteLine("hello, {0}!", strName);  //格式化输出hello信息
  10. }
  11. }