Compiler Warning (level 4) CS0402
'identifier' : an entry point cannot be generic or in a generic type
The entry point was found in a generic type. To remove this warning, implement Main in a non-generic class or struct.
// CS0402.cs
// compile with: /W:4
class C<T>
{
public static void Main() // CS0402
{
}
}
class CMain
{
public static void Main() {}
}
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: