using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; namespace ReportViewer { public static class Extensions { public static string JoinString(this IEnumerable? list, string separator = ",") { if (list == null) throw new ArgumentNullException(nameof(list)); return list.Aggregate(new StringBuilder(), (current, next) => current.Append(current.Length == 0 ? string.Empty : separator).Append(next)).ToString(); } } }