How the dispose() method works in C#.net?

Posted by Shailesh Jaiswal on Stack Overflow See other posts from Stack Overflow or by Shailesh Jaiswal
Published on 2010-03-12T09:58:10Z Indexed on 2010/03/12 10:07 UTC
Read the original article Hit count: 262

Filed under:

I am developing smart device application in C#. It is a window application. In that application I have created the 4 to 5 window form. I am navigating in these forms from one form to another form by using linklabel control in C#. In linklabel_Click() method which I am using to navigate I am using the code form1.show() according to need. I read that form1.show() method automatically calls the form1.dispose() method on the from1. I also read that once we dispose the form it is removed from memory & we can not call it again. But in my application no one form gets disposed. I can see all the form even after calling the form1.show() method. when I use the link to go once again to from1 it does not get disposed. Is anything wrong in my concept? I am new in C#. Please tell me how the dispose method work in above context? What is the use of dispose method. It will be better if you describe me above issue with example.

© Stack Overflow or respective owner

Related posts about c#