Would someone please remind me of adding up ints and show on one label (total from 4 ints).
LMoney.Text=String.Format("%d",Willis_Bank, Meyers_Bank, Mercer_Bank, Guthrie_Bank);
Cheers
EDIT Think I'v done it...
LMoney.Text=String.Format("%d",Willis_Bank + Meyers_Bank + Mercer_Bank + Guthrie_Bank);
Do you need to display four ints one by one or display a sum of 4 ints?
Quote from: Crimson Wizard on Thu 15/09/2022 19:30:42
Do you need to display four ints one by one or display a sum of 4 ints?
Each int gets displayed on it's own Label one by one. The main label displays them as the occur and adds them up on the fly.
Quote from: Slasher on Thu 15/09/2022 19:48:39
Each int gets displayed on it's own Label one by one. The main label displays them as the occur and adds them up on the fly.
If one by one, then you need to have as many %d as you have ints:
LMoney.Text=String.Format("%d, %d, %d, %d", Willis_Bank, Meyers_Bank, Mercer_Bank, Guthrie_Bank);