/// <summary> /// Perform common Concat for IEnumerable data /// </summary> public static IEnumerable <T> Gc <T>(this IEnumerable <T> ArrayNo_0, IEnumerable <T> ArrayNo_1, IEnumerable <T> ArrayNo_2 = null, IEnumerable <T> ArrayNo_3 = null, params IEnumerable <T>[] MoreArrays) { var Result = new T[0].AsEnumerable(); if (ArrayNo_0.C()) { Result = Result.Concat(ArrayNo_0); } if (ArrayNo_1.C()) { Result = Result.Concat(ArrayNo_1); } if (ArrayNo_2.C()) { Result = Result.Concat(ArrayNo_2); } if (ArrayNo_3.C()) { Result = Result.Concat(ArrayNo_3); } if (MoreArrays.C()) { foreach (var Array in MoreArrays) { if (Array.C()) { Result = Result.Concat(Array); } } } return(Result); }
/// <summary> /// Perform common Concat for IEnumerable data /// </summary> public static IEnumerable <T> Gc <T>(this IEnumerable <T> ArrayNo_0, IEnumerable <IEnumerable <T> > ArrayToAdd, params IEnumerable <T>[] MoreArrays) { var r = ArrayNo_0.l(); foreach (IEnumerable <T> cn in ArrayToAdd) { r.AddRange(cn); } if (MoreArrays.C()) { foreach (var a in MoreArrays) { if (a.C()) { r.AddRange(a); } } } return(r); }