Hi friends
I’m a newbie in C# programming.
I’m a surveyor engineer and I want write a program that calculates some required parameters.
My program must read a text file , in that text file each row contains x,y,z for coordinates of a survey point and program must calculate some parameters for each points (by using x,y,z of point coordinate that stored in each rows of text file).my question is how can I read x,y,z in text file and after calculating parameter , store calculated parameters in rows of other text file .
For example:
I have a text file same as below:
5,8,6
2,7,9
7,6,3
6,9,4
I want to write a program that load this text file and read each numbers of in each line and for example summing this 3 number and finally store result in another text file :
19
18
16
19
Can anyone help me how can I do that ? is there any program that show to me how can I do this ?
------------------------------------------
i have faced another problem , how can i create multidimensional array from text file? text file has m rows and n columns and numbers in rows delimited by comma.in fact i want to create a m*n matrix from text file .
for example we have text file like this :
2,3,5,7
4,5,2,1
2,5,8,3
3,4,9,6
1,7,8,9
looks like i have to use nested loop but i have no idea how can i do this ??