I am new in programming and want some help with this.
I have to read a fixed length txt file, and to insert two values form each line in a two dimension array or arraylist. I think that the best choise is the a dynamic array...
I have read the relative topics but it;s not clear to me yet...
Could give me some help please.
Than开发者_运维技巧k you in advance!
I cannot attach any code as I'am out of office know...
In order to read a text file line by line:
using (var file = File.OpenText("foo.txt"))
{
string line;
while ((line = file.ReadLine()) != null)
{
// line will contain the current line being read
}
}
Then you could use a List<T>
to hold the data being parsed from each line.
精彩评论