static void Main() { //var mgc = new MyGenericClass<double>)(); //var mgci = new MyGenericClass<int>)(); var mylist = new List <double>(); mylist.Add(2.3); //Add == push_back mylist.Add(4.4); //need to make IComparable mylist.Sort(); foreach (double d in mylist) { Console.WriteLine(d); } mylist.ForEach(d => { Console.WriteLine(d); }); var mc = new myClass(); double result = mc.Work(d => { return(d * 2.0); }, 15.0); }