Try this :):
var res = string.Join(",", array.Where(s => !string.IsNullOrEmpty(s)));
This will join only the strings which is not null or "".
Try this :):
var res = string.Join(",", array.Where(s => !string.IsNullOrEmpty(s)));
This will join only the strings which is not null or "".