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

Explain the difference between class and interface in .net?

914


Is c and c# the same?

966


What is cts, clr?

895


What is an inheritance ?Give an example in which inheritance is used?

1083


What is object array in c#?

1017


Can properties be static in c#?

1050


Can you change the value of a constant filed after its declaration?

1010


What is the and operator in c#?

1050


What is a partial class. Give an example?

1034


What is hashset c#?

1058


How do you serialize an object?

1181


Can struct be static in c#?

1124


Can you pass parameters to destructors?

1122


What does int32 mean?

950


Write a program to find the angle between the hours and minutes in a clock

975