Say I want to open a new form..
TestForm test = new TestForm();
What is the good way to close it? More precisely, is only calling close() ok? Should I use the using() {} so dispose() is called ? And finally, suppose there is a dialog that should have only one instance of a dialog opened, is there a well ‘known’ pattern? I’ve got different choices such as storing it in a static field, and null-‘ing’ it when it is closed..
Thanks
Well in terms of your single instance dialog (if it’s modal you don’t have to worry) you can make the constructor private and provide a public static method to access the form.
That would force calls to by in the form of..