ITEEDU

实例:C#欢迎程序

Program.cs

using System;
using System.Collections.Generic;
using System.Text;


namespace ConsoleApplication2
{
    class Program
    {
        public static string ReadString(string msg)
        {
            Console.Write(msg);
            return System.Console.ReadLine();
        }
        public static void WriteString(string msg)
        {
            System.Console.WriteLine(msg);
        }
        static void Main(string[] args)
        {
            string name = ReadString("输入你的姓名:");
            WriteString(name + "欢迎来到C#的世界");
            Console.ReadLine();
        }
    }
}

运行方法