Link to home
Start Free TrialLog in
Avatar of 123print
123print

asked on

c# add 1 dynamic value to multi dimensional array

I  am reading a file with digits. I want to take every 2 digits and put them into a two dimensional array. I separated each digit with a ',' to easily make 1 large array, but I am not sure how to take each individual digit and put into the new two dimensional array.
Avatar of xoperator
xoperator
Flag of Israel image

Tell me if you need anything else.
Avatar of 123print
123print

ASKER

Yes. Ive seen this page many times. I know how to manually make and manipulate a multidimensional array but to dynamically add 1 value  at a time (due to the foreach loop taking data from the normal array) still seems to be little different to do.
You cant dynamically add values to the array. Array is a fixed data structure.
You can only assign value to it by accessing it with address.

like int[0] = 10;
or int[1] = 5;
SOLUTION
Avatar of Meir Rivkin
Meir Rivkin
Flag of Israel image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
ASKER CERTIFIED SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial