Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

What is Dispose method in .NET?

Answer Posted / susant

The GC call the Finalize () function automatically to
destroy the object called implicit destroy. When you want
to destroy a objects that you think no longer need and free
it from memory, then we will use the dispose function. For
better
Performance we will use the dispose function explicitly.


The Dispose method in .NET belongs to IDisposable interface
and it is best used to release unmanaged objects like File
objects, Windows API objects, Database connection objects,
COM objects etc from the memory. Its performance is better
than the finalize() method.

Is This Answer Correct ?    9 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

How do I create a single-file assembly?

936


What are virtual classes in c#?

891


Why do we use interfaces in c#?

889


Explain how can I get around scope problems in a try/catch?

859


What is a factory in c#?

829


Why delegates are safe in c#?

806


Tell me the difference between call by value and call by reference.

921


What is the and operator in c#?

918


In languages without exception-handling facilities, we could send an error-handling procedure as a parameter to each procedure that can detect errors that must be handled. What disadvantages are there to this method?

1037


What does m mean in decimal c#?

843


Why do we use methods in c#?

842


What is difference between encapsulation and abstraction in c#?

899


What is class sortedlist underneath?

896


Which is the best language for desktop application?

880


Can a method be sealed in c#?

855