how to write method outside the main method in the program class?
in the non program-main style , how i can write method outside the main method in the program class?
4 Replies
Just do
Only limitation is that methods and classes have to be placed after the top-level code
thanks
Worth noting that they technically are still inside
Main
All methods before the first type are local functions.
Everything after (including) the first type declaration are members of the generated
Program
class.
So basically you can do
fixed, thanks