CSharp examples for System.Collections.Generic:IEnumerable
Add one element to IEnumerable
using System.Linq; using System.Collections.Generic; using System;//w w w. ja va2 s .c o m public class Main{ public static IEnumerable<T> Concat<T>(this IEnumerable<T> head, T tail) { return head.Concat(Enumerable.Repeat(tail, 1)); } }