Atulya Panda
What is the use of the dispose method in C# ?
Posted by Atulya Panda in C# Programming on Nov 26, 2012
  • 1
  • 6
  • 5783
Do you know the answer for this question? Post it below.
Posted by Sandeep Kumar on Sep 28, 2015
  • 1

Dispose method use to remove the object from memory ,which object has no references or those object are unreachable.dispose method get call by user.

Posted by Tanuj Khurana on Sep 18, 2015
  • 1

this is basically used for forcefully garbage collection. if i do not write dispose then its its job is for compiler to do this. but it do not give you surety that it freeze the memory immediately. if i want to force compiler to ask free memory immediately then we use dispose method. it internally calls finalize method.

Posted by shekhar kumar on Apr 01, 2013
  • 1

dispose method are used for forcefully garbage collection..!!!

Posted by shekhar tyagi on Jul 08, 2013
  • 0

dispose method are used for forcefully garbage collection to relase Unmannaged code

Posted by Shankar M on Feb 18, 2013
  • 0

Freeing of resources.. Best Practice is to use the Keyword using which automatically frees the resources that are no longer needed.

Posted by Neena M on Dec 10, 2012
  • 0

dispose is used to relase the resources when they are no longer required.