Share via


How to read a tab delimited text file with Split

Question

Tuesday, August 5, 2008 4:02 AM

 I have successfully used StreamReader to read other text files and used split to separate the delimited fields using code such as:

string[] columns = ordersIn.Split('|');

How do can I use split when the delimiter is a tab?

Marv


Marv V

All replies (1)

Tuesday, August 5, 2008 4:41 AM âś…Answered | 2 votes

 You can use Tab char for splitting the String, like,

String[] names = fullName.Split('\t');