Hi all,
C# newbie working off some tutorials. Is there a way to run an identical command on every object in an array?
Here is my current (working) code:
Guys[0].Cash += Guys[0].MyGuess.PayOut(WinnerNumber);
Guys[1].Cash += Guys[1].MyGuess.PayOut(WinnerNumber);
Guys[2].Cash += Guys[2].MyGuess.PayOut(WinnerNumber);
I'm looking for something that will do this:
Guys[X].Cash += Guys[X].MyGuess.PayOut(WinnerNumber);
X = is first number on first runthrough, then 2nd number on 2nd runthrough, etc.