MCQs>IT & Programming>C#>The number of objects of a given class that exist can be tracked by a introducing a class member variable. Which one of the following solutions allows for this behavior?
C# MCQs
The number of objects of a given class that exist can be tracked by a introducing a class member variable. Which one of the following solutions allows for this behavior?
Answer
Correct Answer: Add a static member variable that gets incremented in each constructor and decremented in the destructor.
Explanation:
Note: This Question is unanswered, help us to find answer for this one