yamid

yamid

  • NA
  • 98
  • 0

reading a text file, line by line and put it in 3D array in C#

Oct 31 2008 9:12 AM

I have a text data file including Double type data ,  as below;
x x x x
x x x x
.
.
.
x x

How to read this data file line-by line from left to right and put them in a 3D array(in C#). The order of numbers in data file  is in the way that first i changes from 0-75, then j to 139 and then k to149.
it means the filling procedure is like this

reading to array from (0,0,0)  to (75,0,0) then (0,1,0) to (75,1,0)...   then(0,139,0)to(75,139,0)
(0,0,1) to(75,0,1) then(0,1,1)to(75,1,1)...    then(0,139,1)to(75,139,1)
.
.
.
(0,0,149)to(75,0,149) then (0,1,149)to(75,1,149) ...then(0,139,149)to(75,139,149)

Thanks alot for your Help


Answers (1)