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

How to reverse a sentence in c program ex: ram is a good boy answer: boy good a is ram

0 Answers   IBM,


why the memory allocated with new cant be freed using free()

2 Answers  


What are virtual functions?

2 Answers  


#include <iostream> using namespace std; struct wow { int x; }; int main() { wow a; wow *b; a.x = 22; b = &a; a.x = 23; cout << b->x; return 0; }

1 Answers  


When you define a integer it gets stored in which data structure?(Stack or a heap)

2 Answers   emc2,






What is class and object with example?

0 Answers  


Whatis the difference between oop and object based language

3 Answers  


Have you ever used threads?

3 Answers   Adobe, IBM,


can inline function declare in private part of class?

1 Answers  


What is the diamond problem in inheritance?

0 Answers  


How is exception handling carried out in c++?

3 Answers  


What is the use of oops?

0 Answers  


Categories