You can use combination of string.Join
and .ToArray()
on Enumerable.
string str = string.Join(",", dt.AsEnumerable()
.Where(r => r.Field<bool>("isSelected"))
.Select(c=>c.Field<string>("RecommendID"))
.ToArray());