goto 使用注意事项

/////这样使用正确。
public void Test
{
string abc = "";
goto This;
string efg = "";
This:
////标记不能放在 最后的一个 “}”之前,必须有
int i =100;

}
///////以下是错误的
public void TestErr
{
string abc = "";
goto This;
string efg = "";
This:
////把这个放到最后一行,是编译不通过的。
}

  

posted on 2011-09-02 10:49  SonyXbox  阅读(259)  评论(0编辑  收藏  举报

导航