Best place to create windows form objects
Posted
by user333484
on Stack Overflow
See other posts from Stack Overflow
or by user333484
Published on 2010-05-13T13:28:28Z
Indexed on
2010/05/13
13:34 UTC
Read the original article
Hit count: 135
I'm creating a windows app in c# 2008 that will have around 8-10 dialog boxes. I want these forms to exist throughout the life of the program. Where's the best place to create and store the objects?
I'm coming from Delphi, where Form objects were usually stored in global variables.
I'm tempted to do it in the static Program class. Should I put them in the main form instead?
Thanks for helping a C# newb out.
© Stack Overflow or respective owner