Y
Hacker News
new
|
ask
|
show
|
jobs
by
MathMonkeyMan
1251 days ago
It's the same as in C. The observation here is that variables with static storage duration can be initialized by running user code before main() begins.
2 comments
colejohnson66
1250 days ago
It’s also the same in .NET. If your Main() function references types that have a static constructor, the constructors could run before Main().
It’s a surprising thing when one first discovers it, but it makes a lot of sense.
link
xjwm
1251 days ago
Oh! Thank you. That makes much more sense now.
link
It’s a surprising thing when one first discovers it, but it makes a lot of sense.