I created a class which is inherited from interface
IDisposable. Now if I use object of this class with using
keyword. Then How the dispose method will get call. Does
garbage collector call it or some else.

Answers were Sorted based on User's Feedback



I created a class which is inherited from interface IDisposable. Now if I use object of this class ..

Answer / amit kumar mishra

public void Dispose()
{
GC.SupressFinalize(this);
}

Is This Answer Correct ?    2 Yes 1 No

I created a class which is inherited from interface IDisposable. Now if I use object of this class ..

Answer / imatoria

http://msdn.microsoft.com/en-us/magazine/cc163392.aspx

Is This Answer Correct ?    0 Yes 1 No

Post New Answer

More C Sharp Interview Questions

Can we inherit class that contains only one private constructor?

0 Answers  


Define method overloading in c#?

0 Answers  


What is unrecognized escape sequence in c#?

0 Answers  


What is the difference between ienumerable and enumerable?

0 Answers  


Which is faster list or dictionary in c#?

0 Answers  






What is the use of readkey in c#?

0 Answers  


Can I use ReaderWriterLock instead of Monitor.Enter/Exit for Threading?

0 Answers   HCL,


Are attributes inherited c#?

0 Answers  


What is helper method in c#?

0 Answers  


Diff b/w casting and boxing

4 Answers   Wipro,


What is delegate in c# interview questions?

0 Answers  


Is goto statement supported in c#?

0 Answers  


Categories