Compiler Error CS0140
The label 'label' is a duplicate
A label with the same name appeared twice. For more information, see goto.
The following sample generates CS0140:
C#
// 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;
}
}
}
Collaborate with us on GitHub
The source for this content can be found on GitHub, where you can also create and review issues and pull requests. For more information, see our contributor guide.
.NET feedback
.NET is an open source project. Select a link to provide feedback: