split string with tab separator

  • Thread starter Thread starter Grey
  • Start date Start date
G

Grey

how to split the string which the separator is TAB.e.g.
string a = "abc bcd abc";
a.split('Tab');

Does it need to use some special character...which like vbTab in VB6...

Million Thanks
 
how to split the string which the separator is TAB.e.g.
string a = "abc bcd abc";
a.split('Tab');

Does it need to use some special character...which like vbTab in VB6....

Million Thanks

Hi Grey,

That special character is '\t'

string[] list = a.Split(new char[]{'\t'});

Happy coding!
Morten Wennevik [C# MVP]
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top