Re: What is the difference between Dispose and close methods.
- From: Göran Andersson <guffa@xxxxxxxxx>
- Date: Tue, 02 Oct 2007 11:11:00 +0200
Bhuwan Bhaskar wrote:
Hi all,
I am a bit confused about dispose and close methods. I will be glad if anyone explain the difference between them to me. Do they have relation with finalize method.
Thanks
Bhuwan
The Dispose method is used to tell the object to clean up everything as it's not going to be used any more. Once Dispose has been called, the object should not be possible to reuse.
The Close method on the other hand doesn't have to make the object unusable. Depending on what's appropriate for the class, it may be possible to reopen the object to reuse it.
--
Göran Andersson
_____
http://www.guffa.com
.
- Follow-Ups:
- Re: What is the difference between Dispose and close methods.
- From: Jon Skeet [C# MVP]
- Re: What is the difference between Dispose and close methods.
- References:
- What is the difference between Dispose and close methods.
- From: Bhuwan Bhaskar
- What is the difference between Dispose and close methods.
- Prev by Date: Re: Collections od KEYS only : BOOLEAN VS OBJECT, False Vs Null/Nothing
- Next by Date: Re: How can I get exact digits of a decimal value
- Previous by thread: Re: What is the difference between Dispose and close methods.
- Next by thread: Re: What is the difference between Dispose and close methods.
- Index(es):
Relevant Pages
|