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

How do I use the thread pool?

573


What are the namespace available in .net?

590


Is .net is a language?

563


How is a managed code executed?

706


Difference between abstract class and interface in .net?

555






What is .net and .net framework?

619


What is typical about a windows process in regards to memory allocation in dot net?

563


Do I have any control over the garbage collection algorithm?

551


What are the new features in .net core?

546


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

552


Explain what inheritance is, and why it's important?

506


Explain about managed heap?

634


What is meant by localization?

637


What is boxing and un-boxing in .net?

595


What are the difference bbetween value type & reference types ? Example from .net. Integer & struct are value types or reference types in .net?

516