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 is the difference b/w Arry.copy() and array.clone() method?

6 Answers  


Is javascript harder than c#?

0 Answers  


What does args mean in c#?

0 Answers  


Explain lock, monitors, and mutex object in threading.

0 Answers  


Which attribute is used in order that the method can be used as webservice?

0 Answers  


What is the use of getcommandlineargs() method in c#.net?

0 Answers  


How do you generate documentation from the C# file commented properly with a command-line compiler?

1 Answers  


What is the ouput of the following program?

0 Answers  


What is regex replace in c#?

0 Answers  


What is the difference between TypeOf and GetType?

4 Answers   Syntel,


What is readline c#?

0 Answers  


What are the Types of JIT and what is econo-JIT

0 Answers   TCS,


Categories