I have a warning and an error in Microsoft Visual studio 2019. Everything was working just fine and this seemed to pop up out of no where.
Main is defined as:
static object Main(string[] args)
But I am getting this whilst trying to compile:
Warning CS0028 'Program.Main(string[])' has the wrong signature to be an entry point Format For Project
Error CS5001 Program does not contain a static 'Main' method suitable for an entry point Format For Project
There are a number of possible signatures for the entry point in to a C# program. Unfortunately static object Main(string[] args)
is not one of them.
I'd say your most likely candidate is either
static int Main(string[] args)
Or
static void Main(string[] args)
For more info checkout Main Method in C# on GeeksforGeeks
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With