求助 Swtich 问题
const string myname = "TOM";const string sexyname = "Jim";
const string sillname = "Kate";
string name;
Console.WriteLine("what is your name?");
name = Console.ReadLine();
switch(name.ToLower())
{
case myname:
Console.WriteLine("1");
break;
case sexyname:
Console.WriteLine("2");
break;
case sillname:
Console.WriteLine("3");
break;
}
Console.WriteLine("Hello {0}!", name);
哪位老兄能不能帮我看一下
这段代码中的 Swtich 部分为什么没结果?
小弟在此先谢拉!