How to access variables defined in top-level statement in the namespace area #4833
Answered
by
En3Tho
peymanmajidi
asked this question in
Q&A
-
How to access variables defined in the top-level statement in the namespace area? |
Beta Was this translation helpful? Give feedback.
Answered by
En3Tho
Jun 16, 2021
Replies: 1 comment 3 replies
-
Just call Console.WriteLine without any of the program/main boilerplate. Basically top level means you're already in "Main" method, you don't need to create entry point manually |
Beta Was this translation helpful? Give feedback.
3 replies
Answer selected by
peymanmajidi
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Just call Console.WriteLine without any of the program/main boilerplate. Basically top level means you're already in "Main" method, you don't need to create entry point manually