How can I do this:
string list = "one; two; three;four";
List<string> values = new List<string>();
string[] tempValues = list.Split(new char[] {';'}, StringSplitOptions.RemoveEmptyEntries);
foreach (string tempValue in tempValues)
{
values.Add(tempValue.Trim());
}
in one line, something like this:
List<string> values = extras.Split(';').ToList().ForEach( x => x.Trim()); //error