I almost figured this out, except I don’t know how to put the actual result of the counter into the array instead of just the counter name. Then, I want it to loop and increase the Price by 1 for each increase the counter has (For example if Counter285 was 7 Price285 would be incremented by 7 by the end of the loop). It’s late and this might be obvious. Sorry.
double[] arr = new double [] {Counter285, Counter134, Counter085};
foreach (double i in arr)
{
if (i == Counter285)
Price285++;
else if (i == Counter134)
Price134++;
else
Price085++;
}
Based on what I’ve understood from your last comment, you’d like to increment
Price285by the value ofCounter285I think this is very simple, just replace
Price285++;withPrice285 += Counter285;Example
Thank you,
I hope you find this helpful 🙂