WinForms - Will there normally only be one instance of MainForm?
Will there normally only be one instance of MainForm?
I need to hold it as a static variable re this issu开发者_StackOverflow社区e I have
Yes, there would normally only be a single instance, unless you specifically create more instances of it in your application code.
Even if you have multiple instances of MainForm, if you declare a variable in the form as static (and not ThreadStatic
), there will only be one copy of that variable.
精彩评论