I am writing WinForms application, and so far it contains 37 forms. This is because of my project’s needs.
My questions are:
- Is there a limitation to the number of forms created in C#?
- Does it have an effect on application performance?
Thanks for your help.
AFAIK there is no such limitation imposed by the the .NET Framework. Obviously the more forms you create and keep in memory, the less memory you will have until you run out of it. And the less memory you have could lead to slower performance.
On the other hand if you keep in memory only the current form and leave the GC take care of the others by leaving their instances fall out of scope there won’t be such problems.