Difference between dispose and destructor?

Answer Posted / nitin

Unused unmanaged resources are removed by dispose method
and It is called manually

Destructor is used to released unused managed resources and
it is called automatically by the Garbase Collector

Is This Answer Correct ?    21 Yes 3 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is the difference between const and readonly in c#.net?

689


What is a race condition?

660


Is c# good for games?

643


Is as operator in c#?

624


What is icomparable in c#?

707


What is a dll in c#?

632


What are the different types of assemblies available and their purpose?

673


Can a struct inherit from an interface in c#?

720


What are some of the commonly used commands in sqlcommand?

675


What is dynamic dispatch?

710


How do I make a dll in c#?

690


What is private variable?

666


Why do we use yield in c#?

661


What can I create with c#?

661


How will you deploy the dll file in gac?

678