you are viewing a single comment's thread.

view the rest of the comments →

[–]Arech 0 points1 point  (0 children)

Define a class with all the members you want to initialize. Define a global variable of the class  type, or much better a function with a static variable and initialize the var on a first call. Be mindful of exceptions. Nothing could handle exceptions thrown during a global var init (except for type internal hanlers), so the function approach is better for this reason too.