CSharp examples for System.Collections.Generic:IEnumerable
Do Join on IEnumerable and return a string
using System.Reflection; using System.Text; using System.Linq; using System.Collections.Generic; using System;//from w w w . j a v a2 s . c om public class Main{ private static String DoJoin<T>(IEnumerable<T> enumerable, StringBuilder builder, string seperator) { var enumerator = enumerable.GetEnumerator(); if (enumerator.MoveNext()) { builder.Append(Convert.ToString(enumerator.Current)); } while (enumerator.MoveNext()) { builder.Append(seperator).Append(Convert.ToString(enumerator.Current)); } return builder.ToString(); } }