In one version, you "assemble" a number in
numbers
and convert it:
numbers += cards[i][position];
value[i] = Convert.ToInt32(numbers]);
So each time round the
position
loop, you convert a longer number.
In the other, you still assemble a longer value in
numbers
, but you don;t use it:
value[i] = Convert.ToInt32(cards[i][position]);
So the value you get in
value[i]
is going to be different.
Make a copy of your solution folder, then open two instances of VS - one for each - and run each version of the code through the debugger. If you step through each program, you should see what differences you get, and why fairly easily.