protected string getZT(int bm)
{
string stem;
switch(bm)
{
case 0:
{
                    stem = "正常";

}
case 1:
{
stem = "封锁";

}
case 2:
{
stem = "删除";

}
return stem;
}
}

解决方案 »

  1.   

    每个case后要加个break;
    return放在switch外面
      

  2.   

    1.stem没有初始化,string stem="";
    2.switch最好加上default语句;
      

  3.   

    switch(bm)
    {
    case 0:
          stem = "正常";
          break;
    case 1:
          stem = "封锁";
          break;
    }
    return stem;

      

  4.   

    protected string getZT(int bm)
    {
    string stem="";
    switch(bm)
    {
    case 0:
    {
    stem = "正常";
       break;
    }
    case 1:
    {
    stem = "封锁";
        break;
    }
    case 2:
    {
    stem = "删除";
        break;
    }

    }
    return stem;
    }
      

  5.   

    像下面这样就可以了。。
    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;
    }
      

  6.   

    noahart(八卦小子) ( )已经写的很明确了
    你的问题应该解决了
    若再有问题就怪了!