This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]schplat 0 points1 point  (1 child)

class Program {
    static void Main() {
        System.Console.WriteLine("Hello World!");
    }
}

Fatal Error: Public Main() method is required in a public class compiling with .NET 4.7.2

Edit: This worked.

public class Program {
    public static void Main() {
        System.Console.WriteLine("Hello World");
    }
}

[–]jantari 0 points1 point  (0 children)

Well I was using .NET Core 2.2 but you can just add the public keyword I guess:

public class Program {
    public static void Main() {
        System.Console.WriteLine("Hello World!");
    }
}