vb.net - VB 2010 Arrays from TXT file -
I need to create a program that opens the text document and the new array for a string from txt for any line adds up. I try with this code but it does not work: New IO.StreamReader ("c: \ * .txt") as new list (string of) in the form of dim x ) O for each string as a. X in redundant () Add (A) Next
Can anyone help me? Thank you.
Make your life easier and It reads all the rows in a string array along with a line of code. ReadToEnd () reads the whole file in a string, so you Loop lines will not be able to loop.
string = file as the dim lines (). Read Line ("c: \" Myfile.txt ")
slow line = Using new list (of the string) () reader = New Stream Reader ("C: \ MyFile.txt"), while not the reader. Add EndOffStream Lines (Reader.
takes care of automatically shutting down the command reader.
Comments
Post a Comment