S
Stoitcho Goutsev \(100\) [C# MVP]
Hi Alok,
If you dispose the form you have to created again next time some part of the
code needs to show the form. It somehow defeats the purpose of the singleton
design pattern.
Be aware that if you dispose a form and check the reference to the form for
null it will fail. You have to chack the reference fo IsDisposed and if it
is to created new instance of the form class. There is no public method to
recreate a control after it's been disposed.
I'm don't know your program but I think you shouldn't dispose the form.
If you dispose the form you have to created again next time some part of the
code needs to show the form. It somehow defeats the purpose of the singleton
design pattern.
Be aware that if you dispose a form and check the reference to the form for
null it will fail. You have to chack the reference fo IsDisposed and if it
is to created new instance of the form class. There is no public method to
recreate a control after it's been disposed.
I'm don't know your program but I think you shouldn't dispose the form.