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 do you create user defined data types in c#?

0 Answers  


Explain the difference between the system.array.copyto() and system.array.clone()?

0 Answers  


What is oledbconnection c#?

0 Answers  


For read-only operation which property you have to designated?

0 Answers   Siebel,


I want to single value if you give any integer value. Below are examples  1. Input: 123  Output: 6 2. Input: 99   9+9=18   1+8  Output: 9 How to get above output?

1 Answers   AxSys,


What is tuple in c#?

0 Answers  


Can multiple catch blocks be executed?

4 Answers   Visual Soft,


What is AutoMapper in C#?

0 Answers   Infosys,


Are private members inherited in c#?

0 Answers  


Is array reference type in c#?

0 Answers  


What is the full form of GAC? Explain its uses?

0 Answers   PUCIT,


What is .cshtml file?

0 Answers  


Categories