protected string getZT(int bm)
{
string stem;
switch(bm)
{
case 0:
{
stem = "正常";
}
case 1:
{
stem = "封锁";
}
case 2:
{
stem = "删除";
}
return stem;
}
}
{
string stem;
switch(bm)
{
case 0:
{
stem = "正常";
}
case 1:
{
stem = "封锁";
}
case 2:
{
stem = "删除";
}
return stem;
}
}
return放在switch外面
2.switch最好加上default语句;
{
case 0:
stem = "正常";
break;
case 1:
stem = "封锁";
break;
}
return stem;
{
string stem="";
switch(bm)
{
case 0:
{
stem = "正常";
break;
}
case 1:
{
stem = "封锁";
break;
}
case 2:
{
stem = "删除";
break;
}
}
return stem;
}
protected string getZT(int bm)
{
string stem;
switch(bm)
{
case 0:
{
stem = "正常";
}break;
case 1:
{
stem = "封锁";
}break;
case 2:
{
stem = "删除";
}break; default:break;
}
return stem;
}
你的问题应该解决了
若再有问题就怪了!