✅ What is wrong with my main method?
It says "The local function 'Main' is declared but never used" Am I not using it already? I want to call the other methods in my Main method.
14 Replies
All methods declared after Tal_2_lika_olika are actually inside that method and not the class
oh
ty xd
also Might want to use a loop for that 🙂
thank u :D
im learning C# in school so i have already made all the other methods in other projects xd
its still not working :/
Error CS5001 Program does not contain a static 'Main' method suitable for an entry point
Still declared under Tal_2_lika_olika becasue of a missing closing bracket
how do u notice
i reread the program like 3 times xd
In VS Code, the static keywords were a different color starting after Tal_2_lika_olika so I figured something was up
i use vs community
the purple one
should i use the blue one
To avoid errors like this, you can check bracket pairs by putting the cursor on one to see the matching one, running Code Cleanup in VS to "fix" indentation. I also use the Viasfora extension to color pairs differently.
Also embrase the auto closing of brackets. When you open, it automatically adds the closing one and puts your cursor in between.
Also when you see alignes brackets like that that's usually a sign something's up somewhere
oki, thank u so much!!
Closed!