mardi 16 juillet 2019

How can i count instances without change contructors logic?

I have created project and in this project I have lots of classes(States, Cities, Companies, Buildings, Animals, Forests.....).

My problem is that I can do this:

$"On class {className[0]} you created {numberOfInstances[0]}"

I find all class names via reflection, but I don´t know how count instances without changing constructor in all created classes.

Or how can I read all new() operators(modifiers) in my project?

I will be happy for any constructive answer :D





Aucun commentaire:

Enregistrer un commentaire