KnowledgeHub
Questions
Tags
Users
Search
Alex Rivera
|
Logout
Edit Question
Title
Body
I am looking at some C# code written by someone else. Whenever a form is instantiated and then shown, the following is done. Is this correct? Why would you use "using" in this context? MyForm f; using (f = new MyForm()) { f.ShowDialog(); } Additional question: Could the following code be substituted? using (MyForm f = new MyForm()) { f.ShowDialog(); }
Tags (comma-separated)
Save Edits
Cancel