伪代码:
main()
{
while( running())
}
bool running()
{
string key=Console.ReadLine();
if(key=="退出")
{return false;}
switch(key)
{
case "XX" :Do yourself;break;
}
return true;
}
神马意思?Console.ReadLine()没有返回值?
你用if else语句进行判断,看是否有参数输入就ok了!