Create a comma delimited list
Description: This converts rows returned from a reader into a comma-delimited string.
Link: http://www.codekeep.net/snippets/07df10fa-37c2-4a2e-8bb1-b26c55cecc05.aspx
private string GetCommaDelimitedList(IDataReader reader)
{
string list = string.Empty;
StringBuilder sb = new StringBuilder();
while (reader.Read())
sb.AppendFormat(",{0}", reader[0]);
if (sb.Length > 0)
list = sb.ToString(1, sb.Length - 1);
return list;
}






