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
When would you use generics in your code c#?
What do you understand by the terms datareader object and dataset object?
Can we instantiate abstract class in c#?
What does the dispose method do with the connection object?
What are the differences between a class and a struct?
what is a constructor? What is a destructor?
What is the use of return in c#?
Why do we need constructor?
Why do we use Design Pattern in C#?
If a method's return type is void, can you use a return keyword in the method?
What is Named parameter in C#?
Why linq is having select clause at the end?
What is continue in c#?
What is a property c#?
How does dll hell solve in .net?