-
Jun 21st, 2015, 08:19 AM
#1
Thread Starter
Junior Member
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
-
Jun 21st, 2015, 08:23 AM
#2
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.
Tags for this Thread
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|