I did some searching on here and couldn't find the answer I exactly needed. I have a struct that contains search parameters that I need to send to a Web Service, and one of the fields I am trying to fill is a List. The original code was written to fill this param. when it was of type string[], so it looked like this, with the variable names altered,
searchParams.someParam= (new List<string>(txtboxInput.Text.Split(';'))).ToArray();
(The ; was delimiting the different options the user could enter)
So what I was thinking of filling the List with List.Add() 'while' there are tokens available. I searched if there was a StringTokenizer-like implementation in .NET. Most answers said to use string.Split, but do nothing to mention the other useful methods that Java's StringTokenizer had as well.
Thank you for any thoughtful replies.