C
C#4w ago
manuka

What does this mean

i know its just a ide recommendation but what does it mean
No description
4 Replies
Pobiega
Pobiega4w ago
It means you never create an instance of that class, ie var x = new Program();
felsokning
felsokning4w ago
Given your code, it's also possible you're trying to do an assembly instead of a Console-type (read: exe), so VSCode assumes you need to initialise the code. Add this to the properties group of the CSProj, if you're just trying to write a Console app: <OutputType>Exe</OutputType>
Becquerel
Becquerel4w ago
you can also define the Program class as static to remove the warning public static class Program
FusedQyou
FusedQyou4w ago
Yes, make it static and internal and then you have a proper entry program class You can also remove it entirely https://learn.microsoft.com/en-us/dotnet/csharp/tutorials/top-level-statements
Want results from more Discord servers?
Add your server