I'm trying the following
string tl = " aaa, bbb, ccc, dddd eeeee";
var tags = new List<string>();
tags.AddRange(tl.Split(','));
tags.ForEach(x => x = x.Trim().TrimStart().TrimEnd());
var result = String.Join(",", tags.ToArray());
But it doesn't work, the tags always come back as " aaa", " bbb".
How can I trim all elements in a list?