static void Main(string[] args)
    {
        class1       c1    = new class1(1, 2);
        Func <int>   getp1 = c1.getp1;
        class2 <int> c2    = new class2 <int>(getp1);

        c2.Add(c1);
    }
Esempio n. 2
0
        public ActionResult addclass(classviewmodel dept)
        {
            bool X = rept.Add(dept);

            return(Json("success", JsonRequestBehavior.AllowGet));
        }
    public Class1()     // constructor of Class 1
    {
        class2 cs = new class2();

        cs.Add(4, 5);
    }