✅ I keep getting Error CS5001 and CS0028, how do i get rid of them

in CS5001 it says Program does not contain a static "Main" method suitable for an entry point and in CS0028 it says 'Program.Main(Application[])' has the wrong signature to be an entry point
19 Replies
phaseshift
phaseshift2y ago
Make a proper main Google for c# main
daniel🔥🔥🔥
ok wait
Unknown User
Unknown User2y ago
Message Not Public
Sign In & Join Server To View
daniel🔥🔥🔥
it's correct but it's not working? idk it just came
Unknown User
Unknown User2y ago
Message Not Public
Sign In & Join Server To View
daniel🔥🔥🔥
how
Unknown User
Unknown User2y ago
Message Not Public
Sign In & Join Server To View
daniel🔥🔥🔥
wym
Unknown User
Unknown User2y ago
Message Not Public
Sign In & Join Server To View
daniel🔥🔥🔥
ok
Unknown User
Unknown User2y ago
Message Not Public
Sign In & Join Server To View
daniel🔥🔥🔥
nah
jen
jen2y ago
what does the main signature look like?
Unknown User
Unknown User2y ago
Message Not Public
Sign In & Join Server To View
MODiX
MODiX2y ago
The possible signatures for Main are
public static void Main() { }
public static int Main() { }
public static void Main(string[] args) { }
public static int Main(string[] args) { }
public static async Task Main() { }
public static async Task<int> Main() { }
public static async Task Main(string[] args) { }
public static async Task<int> Main(string[] args) { }
public static void Main() { }
public static int Main() { }
public static void Main(string[] args) { }
public static int Main(string[] args) { }
public static async Task Main() { }
public static async Task<int> Main() { }
public static async Task Main(string[] args) { }
public static async Task<int> Main(string[] args) { }
public is not required (can be any accessibility). Top-level statements are compiled into a Main method and will use an appropriate signature depending on the body. https://docs.microsoft.com/en-US/dotnet/csharp/fundamentals/program-structure/main-command-line
Main() and command-line arguments - C#
Learn about Main() and command-line arguments. The 'Main' method is the entry point of an executable program.
Unknown User
Unknown User2y ago
Message Not Public
Sign In & Join Server To View
daniel🔥🔥🔥
which part
Unknown User
Unknown User2y ago
Message Not Public
Sign In & Join Server To View
daniel🔥🔥🔥
ok wait a sec i love u bro thank u so much

Did you find this page helpful?