CSharp examples for System.Collections.Generic:IEnumerable
IEnumerable As Typed List
using System.Collections.Generic; using System.Collections; using System;// ww w .j av a 2 s .c om public class Main{ public static IList<T> AsTyped<T>(this IEnumerable collection) { List<T> typedCollection = new List<T>(); foreach (T item in collection) { typedCollection.Add(item); } return typedCollection; } }