What is Dispose method in .NET?

Answers were Sorted based on User's Feedback



What is Dispose method in .NET?..

Answer / susant

The GC call the Finalize () function automatically to
destroy the object called implicit destroy. When you want
to destroy a objects that you think no longer need and free
it from memory, then we will use the dispose function. For
better
Performance we will use the dispose function explicitly.


The Dispose method in .NET belongs to IDisposable interface
and it is best used to release unmanaged objects like File
objects, Windows API objects, Database connection objects,
COM objects etc from the memory. Its performance is better
than the finalize() method.

Is This Answer Correct ?    9 Yes 0 No

What is Dispose method in .NET?..

Answer / bhasker

The Dispose method may be called on any instance of any type implementing the IDisposable interface. This is supported by the C# using statement which makes calling Dispose automatically easy.

Is This Answer Correct ?    0 Yes 0 No

What is Dispose method in .NET?..

Answer / mkm

dispose method is last method excuted in c# program

while finally will excute after the try block

Is This Answer Correct ?    0 Yes 2 No

Post New Answer

More C Sharp Interview Questions

What does mean c#?

0 Answers  


What is a partial method?

0 Answers  


What is the difference between list and ilist in c#?

0 Answers  


How to prevent the error while updating ui control from another thread?

0 Answers  


What is array collection?

0 Answers  






What is enumerable in c#?

0 Answers  


Is namespace necessary in c#?

0 Answers  


What is the best dependency injection c#?

0 Answers  


What is out int in c#?

0 Answers  


How do you debug an ASP.NET Web application?

1 Answers  


How to raise an selection changed event associated with listbox in datagridview control with a sample example?Here the listbox is a child control associated with datagridview control.

3 Answers  


What is msil in c#?

0 Answers  


Categories