首先添加命名空间:
using System.Diagnostics;
namespace 控制台
{
class Program
{
static void Main(string[] args)
{
Console.WriteLine("please input :1-千千静听,2-IE,3-计算器");
int cmd = Console.Read();
if (cmd == 49)
Process.Start("TTPlayer.exe");
else if (cmd == 50)
Process.Start("IEXPLORE.EXE");
else if (cmd == 51 )
Process.Start("Calc.exe");
Console.ReadLine();
}
}
}