Hi,
What is difference between close() and dispose() in c#.
Thanks, in advance
Difference Between close and dispose method
2 Answers
Know the answer? Post it. Somebody with the same question will find it here.
Know the answer? Post it. Somebody with the same question will find it here.
Answer a question in the forums and earn +20 SHARP for every answer.
See unanswered questions
DevSocialUpcoming · 3rd editionAI Agents ConferenceDec 1–3, 2026Live onlineFree to attend5days leftRegister
Satyapriya NayakRank #47 · 31.5K reputationPosted Aug 22, 2011, 7:57 PM EDT
The difference between calling the Close and Dispose methods on database connections. Close leaves the connection in a closed state; but, it is reusable—all properties, etc. can be accessed and Open can be called. On the other hand, after calling Dispose on a database connection as with any object, the connection object can no longer be accessed.
Refer below link also
http://dotnetguts.blogspot.com/2007/06/difference-between-close-and-dispose.html
Thanks
Jiteendra SampathiraoRank #585 · 4.1K reputationPosted Aug 22, 2011, 9:55 PM EDT
refer this LINK