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

Describe ways of cleaning up objects.

8 Answers   Wipro,


How?s the DLL Hell problem solved in .NET?

1 Answers   Visual Soft,


Explain About the Sattilite Assembly in .Net Technology?

2 Answers   TCS,


What is the difference between new and override in c#?

0 Answers  


Are there constructors in c sharp?

0 Answers  






How many digits is a 32 bit number?

0 Answers  


Overloaded constructor will call default constructor internally?

0 Answers  


What is Implementation inheritance and interface inheritance?

0 Answers  


Explain about finalize method?

0 Answers  


Write a short note on interface?

0 Answers  


What is icollection in c#?

0 Answers  


Explain About Virtual functions and their use.

0 Answers  


Categories