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

Answer Posted / 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       View All Answers


Please Help Members By Posting Answers For Below Questions

Why we use classes in oop?

792


What is class in oop with example?

846


What is polymorphism in oops with example?

783


What are the three parts of a simple empty class?

1777


What is constructor overloading in oop?

878


State what is encapsulation and friend function?

955


Why is polymorphism important in oop?

828


Why is there no multiple inheritance?

779


Can we create object of interface?

853


What is difference between abstraction and encapsulation?

824


What is encapsulation and abstraction? How are they implemented in C++?

868


What is coupling in oops?

833


What type of loop is a for loop?

873


#include #include #include #include void select(char *items, int count); int main(void) { char s[255]; printf("Enter a string:"); gets(s); select(s, strlen(s)); printf("The sorted string is: %s.\n", s); getch(); return 0; } void select(char *items, int count) { register int a, b, c; int exchange; char t; for(a = 0; a < count-1; ++a) { exchange = 0; c = a; t = items[ a ]; for(b = a + 1; b < count; ++b) { if(items[ b ] < t) { c = b; t = items[ b ]; exchange = 1; } } if(exchange) { items[ c ] = items[ a ]; items[ a ] = t; } } } design an algorithm for Selection Sort

2338


What are the important components of cohesion?

762