What is Dispose method in .NET ?

Answer Posted / sudhir sheoran

There are two ways to release the unmanaged resources.
1) Finalize:- Managed/ called by CLR
2) Dispose:- Called by the programmer.

Dispose uses IDisposable interface and suppresses the finalize
method,when called by the programmer.
If programmer forgets to implement dispose method
finalize get invoked and unmanaged resources are freed.

Is This Answer Correct ?    1 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What do you mean by delegates and explain different types of delegates?

596


What is void method?

583


Define satellite assembly in c#?

568


How to put assembly in gac?

615


What are the benefits of using generics?

572






Can properties be static in c#?

636


Describe the parts of assembly.

605


Explain about ODP.net

878


What is generic delegates in c#?

614


What is the property of class?

667


Can datetime be null c#?

564


What is concrete class in c# with example?

560


Illustrate the process of code compilation in c#?

590


What do you use c# for?

573


Is typeof c#?

616