Compiler Warning (level 4) CS0028
'function declaration' has the wrong signature to be an entry point
The method declaration for Main
was invalid: it was declared with an invalid signature. Main
must be declared as static and it must return either int or void. For more information, see Main() and Command-Line Arguments.
The following sample generates CS0028:
// CS0028.cs
// compile with: /W:4 /warnaserror
public class a
{
public static double Main(int i) // CS0028
// Try the following line instead:
// 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: