I have a text data file including a lot of double data set as below:
the dta are separated by 3 spaces.

x x x x x
x x x x x
x x x

I want to read these data line by line and from left to right, and put them in a 3D array of size:76*150*140
for( int k=0;k<139;k++)
for(int j=0;j<150;j++)
for(int i=0;i<75:i++)

ok, well you have some loops and so on thats good but the data you've shown in your file is 2d, how do you tell which dimension each part you read is to be placed in?

the data are 3D !
it means they are just coming after each other.
I have 1596000 double data that configure an array of 76*150*140. The text file just showing all of the data but in a manner that I can put them in a 3D array. the manner is showing in the loop. first the inner loop is being filled then outward.

So I need to read every data

you can think of the 16 data like this:
I would like to put them in a 3d array with
4*2*2 dimension.

1 2 3 4 5 6 7 8
9 10 11 12 13
14 15 16

for k=0 I have ,
1 2 3 4
5 6 7 8
and for k=1 I have
9 10 11 12
13 14 15 16

for example A[0,0,0]=1

OK, so, what bit exactly are you having issues with?

OK, so, what bit exactly are you having issues with?

As I am a new commer to C# ,I donot know how to do this? can u plz help me?

That hasnt answered the question, what exactly do you have the issue with?

I was using below codes: but it's not working:(data are space deliminated)
the error is Input string is not in correct format

double[,,] dArray = new double[76,150,140];
string line = null;
string[] numbers = null;

StringReader sr = new StringReader(filePath);

for (int k = 0; k < 139; k++)
   for(int j = 0; j < 149; j++)
      line = sr.ReadLine();
      numbers = line.Split('');
      for(int i = 0; i < 75; i++)
         dArray[i,j,k] = double.Parse(numbers[i]);


and when it crashes whats the value of numbers?

at the begining...just upon the reading of darray[i,j,k]

again, that wasnt the question I asked.

I asked you what the value of numbers is..