/////这样使用正确。
public void Test
{
string abc = "";
goto This;
string efg = "";
This: ////标记不能放在 最后的一个 “}”之前,必须有
int i =100;
}
///以下是错误的
public void TestErr
{
string abc = "";
goto This;
string efg = "";
This: ////把这个放到最后一行,是编译不通过的。
}
/////这样使用正确。
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/archive/2011/09/02/2163461.html