C
C#8mo ago
RBMKBlaze

✅ Getting back main function

Recently after updating to CS8 (didnt update in a long time), and creating a console app there is no main function, how can i get it back?
4 Replies
SinFluxx
SinFluxx8mo ago
it's technically not gone anywhere / you don't need it back, it's just using "top level statements" - it should have also inserted a comment with a link at the top of the file explaining what they are? If not, here: https://learn.microsoft.com/en-us/dotnet/csharp/fundamentals/program-structure/top-level-statements
RBMKBlaze
RBMKBlaze8mo ago
it wasnt there, ty
SinFluxx
SinFluxx8mo ago
It might be because they were introduced a while ago so they've gotten rid of it now, not sure
PixxelKick
PixxelKick8mo ago
What do you need it for? You can get the passed in args via the args variable you can still access