C# pulling out columns from combobox text
- by Mike
What i have is four comboboxes and two files. If the column matches the combobox i need to write it out to a file but it has to appened with the second combobox. So for example
Combobox1: Apple | Orange
Combobox2: Pineapple | Plum
I have selected Apple Plum
I need to search threw a text file and find whatever columns is Apple or Plum:
Orange|Pear|Peach|Turnip|Monkey|Apple|Grape|Plum
and then i need to write out just the columns Apple|Plum to a new text file. Any help would be awesome!
Better example
Combobox1 selected item:Apple
Combobox2 selected item:Plum
Text FILE:
APPLE|Pear|Plum|Orange
1|2|3|4
215|3|45|98
125|498|76|4
4165|465|4|65
Resulting File:
1|3
215|45
125|76
4165|4
Thanks for the advice, i dont need help on adding to combobox or reading the files, just how to create a file from a delimited file having multiple columns.