goto 使用注意事项

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

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

  

原文地址:https://www.cnblogs.com/server126/p/2163461.html