|
-
Mar 17th, 2005, 10:03 AM
#1
Thread Starter
New Member
Split question
I'd like to know how can I split a string with tabs as delimiters
I tried the following code
string inputString = "0\t100\t-5\t300\t500"; \\ \t are tabs
string delimStr ="\t";
char [] delimiter = delimStr.ToCharArray();
string [] split = input.Split(delimiter, x);
at this point, I expected the split array to contain the numbers separately (0, 100, -5, 300, and 500)
but instead the array only contains one element that is 0\t100\t-5\t300\t500
Any tips on this?
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
|