Can you explain why that Console.WriteLine has to be above the enum ? It does not work if you would declare it below.
@TeddySmithDev13 күн бұрын
Console should be below not above. Might be an error. If you post code I’ll look at it.
@myam7542 ай бұрын
Hey Teddy, noob question: why can I access the enum before it's declared? Love the quality of this course, btw.
@TeddySmithDev2 ай бұрын
this is excellent question. My theory is that because they aren't instantiated, they are just "there" in memory (almost like static). Maybe because it's so lightweight that compiler just makes available everywhere. I even googled this and none of the answers really even explain it correctly. This would be good question to ask Jon Skeet or Eric Lippert!
@myam7542 ай бұрын
Interesting.. glad I asked then. Thanks@@TeddySmithDev!