top button
Flag Notify
    Connect to us
      Site Registration

Site Registration

What are the concepts of DISPOSE method?

+5 votes
What are the concepts of DISPOSE method?
posted Feb 11, 2015 by Vrije Mani Upadhyay

Share this question
Facebook Share Button Twitter Share Button LinkedIn Share Button

1 Answer

+1 vote
Best answer

Dispose method belongs to IDisposable interface. It is used to free unmanaged resources like files, network connection etc. it manages and handles this by an instance of the class that implements this interface. Dispose methods must be called explicitly and hence the any object using IDisposable must also implement finalizer to free resources in situations wherein Dispose is not called. Multiple calls to dispose method must be ignored when called once. The objects disposable methods must be called in the order of containment.

answer Feb 13, 2015 by Rajneesh
Similar Questions
+4 votes

How can we perform Sorting a list of strings without using any built-in sort method?

+3 votes

By-default all the methods & variables in class are private.

In Main() method is private then how compiler access this Main() Method out side the class because compiler is not part of our program then how compiler access this Main() method?

Here we loose our data abstraction property ? Can anyone put some light on it?