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

what is used ref keyword in c#,and how we used it?

2 Answers  


What does a constructor do c#?

0 Answers  


write a program to find the biggest palindrome in the given string

0 Answers   Microsoft,


What are expressions c#?

0 Answers  


Is object an int c#?

0 Answers  






Is unboxing an implicit conversion?

0 Answers  


Difference between call by value and call by reference in C#?

0 Answers   Hexaware,


How is exception handling implemented in c#?

0 Answers  


What is Dispose method in .NET?

3 Answers  


What are get and set in c#?

0 Answers  


Can you call from an inherited constructor to a specific base constructor if both base class and an inheriting class has a number of overloaded constructors?

0 Answers   Siebel,


What is a satellite assembly in c#?

0 Answers  


Categories