writing tab delimited files into an array
I have a text file called text.txt in the location C:\testfolder
in this file there are four values separated by tab (chr(9)) values like so (note that (chr(9) represents a tab spacing and not actual text): test1(chr(9))test2(chr(9)test3(chr(9)test(4)
I need a function that reads each value into an array by separating the values based on an encounter with a tab spacing i.e.
egarray(0) = test1
egarray(1) = test2
egarray(2) = test3
egarray(3) = test4
thanks
Re: writing tab delimited files into an array
If there's just one line in the file then I'd think that calling File.ReadAllText to read the file into a String and then calling Split on that String to create an array would be the way to go. You can pass ControlChars.Tab as an argument to String.Split.