using System; using static System.Console; using static System.Math; class main{ public static void Main(){ Write("hello\n"); genlist mylist = new genlist(); mylist.add(1.0); mylist.add(2.0); mylist.add(3.0); mylist.add(4.0); Func f; f = Sin; /* Sin here is implicitely cast to Func */ double a=10; // f = delegate(double x){return x*a;}; /* anonymous delegate */ f = (double x) => x*a; /* the same in lambda-notation */ a=0; /* "a" is captured by reference (until returned) */ for(int i=0;i