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

how to use caching in our program. why we use it give one example in code

1 Answers  


Is c# front end or back end?

0 Answers  


What is serialization of data?

0 Answers  


Suppose in a scenario if we want to display information only until 4.00 p.m and after that means after 4.00 p.m if any one tries to access the information it should give error mesage. Then how will you write a delegate for this ? Give coding.

1 Answers   HP, nTech Solutions, Primetech Software, PS,


What is the use of functional interface?

0 Answers  


Is list ienumerable c#?

0 Answers  


How to use exception handling in stored procedure?

0 Answers   Wipro,


How many static constructors are allowed in a class?

0 Answers  


What is the difference between method overriding and method overloading?

0 Answers  


How many variables do you need?

0 Answers  


Can constructor be protected?

0 Answers  


Can abstract class be sealed?

0 Answers  


Categories