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

Is there hashmap in c#?

0 Answers  


What is a ienumerator?

0 Answers  


What namespace is list in c#?

0 Answers  


Can datetime be null c#?

0 Answers  


Can we create instance for Abstract class?

28 Answers   HCL, Satyam, SoftSol, Wipro,


What are the types of comments in c#?

0 Answers  


About a class access specifiers and method access specifiers ?

3 Answers   MMTS,


What is data dictionary in c#?

0 Answers  


What are bitwise logical operators?

0 Answers  


What is difference between float and decimal?

0 Answers  


what is a destructor?

0 Answers   Amazon,


Why data types are important in c#?

0 Answers  


Categories