I have 50 labels on my tokens. These are ingredient quantities.
The label names are ing1,ing2,ing3,,,,,ing50.
I'm tying to calculate the sum of all label values this way but its not working.
int total = 0; for (int i = 1; i <= 50; i++) { string tok = "ing"+tostring(i); total=total+token.tok; } return total;
Am I close?