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...

Where does the dispose method lie and how can it be used to
clean up resources?

Answer Posted / rutu

Dispose() is available in System.IDisposable interface.
Microsoft has suggested two methods that can be invoked by
the programmer for the release of resources i.e Close() and
Dispose().
If any of the method is invoked by the programmer before
loosing the reference to an object, care must be taken to
avoid finalze() to be invoked on the same object when it is
garbage collected and we can do this using
GC.SuppressFinalise().

Public Sub Dipose()' or Close()
'write code here to release the resources
GC.SuppressFinalize(Me)
End Sub

Is This Answer Correct ?    0 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is cache memory in c#?

865


Is everything an object c#?

861


How do I create a multilanguage, single-file assembly?

873


What is the default value of singleordefault?

881


Why it's said that writing into .NET Application Configuration Files is a Bad Idea?

914


Is c# dictionary a hash table?

838


Can we inherit partial class in c#?

871


What are collection classes?

879


What is the full form of GAC? Explain its uses?

938


What does the parsefloat function do?

868


What is using in c#?

805


Are string objects mutable or immutable?

883


How do you specify a custom attribute for the entire assembly (rather than for a class)?

906


What are the collection types can be used in c#?

826


Can we make a Static Constructor Parameterized? Give Reason with your answer

923