Opening forms using C#. Is one way better than another?
What is the difference between opening a form this way:
if (ViewGLDistributionsForm == null){ ViewGLDistributionsForm = new frmViewGLDistributions();}else{ if (ViewGLDistributionsForm.Created == false) { ViewGLDistributionsForm = new frmViewGLDistributions(); }}ViewGLDistributionsForm.Show();ViewGLDistributionsForm.Activate();
I am still learning C# and I see multiple ways to open forms. Is there a proper way or is one way better under one set of circumstances and another way better under another set of circumstances?