I have a few local variables and I want to divide them all divide them all by the same number.
decimal a = 0;
decimal b = 0;
decimal c = 0;
...
decimal n = 0;
decimal divisor = 0;
<perform calculations to give all variables meaningful values>
divide each decimal (a - n) by divisor then assign value
Beside dividing and assigning every variable with:
a = a / divisor;
b = b / divisor;
and so on...
Is there a faster way? I'm thinking something along the lines of putting them all in a collection and iterating over it...
I don't need the values in a list, I need the variables to contain them. I was thinking of something along the lines using a list of pointers, iterating over it and setting the values that way.