更新:2007 年 11 月
错误消息
标签“label”重复
同名的标签出现了两次。有关更多信息,请参见goto(C# 参考)。
下面的示例生成 CS0140:
// CS0140.cs
namespace MyNamespace
{
public class MyClass
{
public static void Main()
{
label1: int i = 0;
label1: int j = 0; // CS0140, comment this line to resolve
goto label1;
}
}
}