CSharp examples for System.Collections.Generic:List
Create One Element List
using System.Collections.Generic; using System.Collections; using System;/*from w w w . j av a 2 s .com*/ public class Main{ public static List<T> CreateOneElementList<T>(T element) { List<T> ret = new List<T>(1); ret.Add(element); return ret; } }