This probably has a simple answer, but I must not have had enough coffee to figure it out on my own:
If I had a comma delimited string such as:
string li
I think the simplest thing would be to Split and then Join.
string nameList = "Fred,Sam,Mike,Sarah"; string[] names = nameList.Split(','); string quotedNames = "'" + string.Join("','", names) + "'";