how to find no of instances of an object in .NET?



how to find no of instances of an object in .NET?..

Answer / gouri patil

When u create object of class it invoke Constructor. So
declare variable and increase in Constructor and
parametrised Constructor you will get number.

Is This Answer Correct ?    7 Yes 0 No

Post New Answer

More OOPS Interview Questions

Why do we use polymorphism?

0 Answers  


Why is there no multiple inheritance?

0 Answers  


There are 2 classes defined as below public class A { class B b; } public class B { class A a; } compiler gives error. How to fix it?

3 Answers   Microsoft,


explain sub-type and sub class? atleast u have differ it into 4 points?

0 Answers   Infosys,


how do you handle yourself when you feel the wald is aganist you

2 Answers  






What is variable example?

0 Answers  


What is Method overloading?

5 Answers  


What is the difference between declaration and definition?

20 Answers   IBS,


what is object oriented programming and procedure oriented programming?

3 Answers  


What is encapsulation?

17 Answers   TCS,


What is polymorphism what is it for and how is it used?

0 Answers  


Can enum be null?

0 Answers  


Categories