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.

Answer Posted / amit kumar mishra

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

Is This Answer Correct ?    2 Yes 1 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Distinguish between continue and break statement?

653


What is the use of xmlserializer?

553


Why abstract class can not be instantiated?

540


What is xamarin used for?

589


What is use of FormBoarderStyle Propertie

598






How to use the sreamReader class to read form a text file?

648


What is the difference between final finally and finalize in c#?

547


Why would you use untrusted verification?

624


Explain what are three test cases you should go through in unit testing?

580


Can you instantiate an abstract class c#?

576


What's new in c#?

582


What is a void c#?

579


Is double a decimal?

598


How can I use .NET components from COM programs?

583


What is float in unity?

581