I have a string that comes in like:
string email = "a@a.com, b@b.com, c@c.com";
I want to split it into an array of strings
If I do this:
string[] emails = email.Split(',');
I get spaces in front of each email address (after the first one):
emails[0] = "a@a.com"
emails[1] = " b@b.com"
emails[2] = " c@c.com"
What is the best way to get this (either a better way to parse or a way to trim all strings in an array)?
emails[0] = "a@a.com"
emails[1] = "b@b.com"
emails[2] = "c@c.com"