Home > Back-end >  How do I create several object statistics a class total?
How do I create several object statistics a class total?

Time:09-15

Dynamically create cash, and then created a few want to calculate a total, Delphi implementation?

CodePudding user response:

Can use the class variables, similar to global variables:
Type
TTestClass=class
Private
The class var Count: integer;
//...
The end;
Then increase the count in the constructor and destructor count reduction, add an attribute or read class attribute,
  • Related