introduction and question re: MyReader and multiple text files.

Moss

New member
Joined
Apr 19, 2009
Messages
1
Programming Experience
Beginner
Hi, Moss here, new to the board and to VB.net. I hope i don't bother you all with my first post!!
here we go!

I have an issue populating a combo box:
say for example i have 2 text files fileone.txt and filetwo.txt
Dim strFileone as String
Dim strFileTwo as string


this code:
Using MyReader As New Microsoft.VisualBasic.FileIO.TextFieldParser(strFileone)
MyReader.TextFieldType = FileIO.FieldType.Delimited
MyReader.SetDelimiters(vbTab)
sets my parser parameter to read the first text file.....

can anybody advise me on how i can include both text files in the parser?

additional info:
There is another combo box which looks like this:
cmbComboBox1.Items.add ("file one")
cmbComboBox1.Items.add ("file two")

which calls each text file to the second combobox when selected.

i hope i am making sense here!!
can anyone advise?
 
You read in one file to a variable, then read in the second file to a variable then you combine the two files (or append the 2nd file to the first when reading it in.

Also, there's no need to use anything in the Microsoft.VisualBasic namespace, especially file operations, use System.IO for that stuff.
 
Back
Top