开发者

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.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜