Hi guys I have a problem at hand that I can\'t seem to figure out, I have a string (C#) which looks like this:
string tags = \"cars, motor, whee
You are looking for the C# split() function.
string[] tags = tags.Split(',');
Edit:
string[] tag = tags.Trim().Split(new string[] { ", " }, StringSplitOptions.RemoveEmptyEntries);
You should definitely use the form supplied by Justin Niessner. There were two key differences that may be helpful depending on the input you receive:
You had spaces after your ,
s so it would be best to split on ", "
StringSplitOptions.RemoveEmptyEntries
will remove the empty entry that is possible in the case that you have a trailing comma.