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

Explain the three test cases in unit testing?

0 Answers   Siebel,


Which types of inheritances does c# support?

0 Answers  


What is boxing & unboxing?

0 Answers  


What is the difference between == and object.equals?

0 Answers  


What is difference between variable and property in c#?

0 Answers  






Can you declare a field readonly?

0 Answers  


Define constructors

0 Answers  


What is array class in c#?

0 Answers  


What is the difference between Hash Table and Arrays?

12 Answers   IBM,


What is cli in c#?

0 Answers  


Is there any way to access private memebers of an object from another object?

4 Answers   TCS,


Does c# have its own class library?

0 Answers  


Categories