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

Answer Posted / srinivas persineti

dispose method is in IDisposable interface,when you are
writing any class in .Net u should inherit the IDisposable
interface and u should implement the Dipoase method.in
dispose method u can call teh GC.Collect() to free up the
object.along with u can aslo call GC.SuppressFinalize() to
avoid multiple callings of GC.

Is This Answer Correct ?    4 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Explain how to manage pagination in a page using .net?

552


Write the .net syntax for 'while loop'?

586


Explain boxing and unboxing in .net.

571


What is the difference between odbc and ado?

544


What is misl?

629






If you are executing these statements in commandobject. Select * from table1; select * from table2? How you will deal result set? 42. How do you sort a dataset.

542


What is the purpose of IClonable interface in .NET?

606


Explain the different types of proxy patterns?

688


Tell us what is heap and what is stack?

567


Explain how to stop a thread?

621


What are an object and a class?

570


What is implement a generic action in webapi?

727


I am constantly writing the drawing procedures with system.drawing.graphics, but having to use the try and dispose blocks is too time-consuming with graphicsobjects. Can I automate this?

541


How to view a .NET assembly?

605


Different between .net & j2ee ?

594