Esempio n. 1
0
        static void Main(string[] args)
        {
            SomeLongRunningData sm = new SomeLongRunningData();

            sm.SomeMethod(CallBackMethod);
            Console.ReadKey();
        }
Esempio n. 2
0
        //public delegate void SomeMetgodDel(); //tutaj tworzymy delegat

        static void Main(string[] args)
        {
            //SomeMetgodDel someDele = SomeMethod; //tutaj robimy wskaźnik
            //someDele.Invoke();

            SomeLongRunningData sm = new SomeLongRunningData();

            sm.SomeMethod(CallBackMethod);

            //Dynamic

            //   string tojeststring = "aa";
            //
            //   var mvar = 1 + 3;
            //   dynamic dyn = 1 + 3;
            //   object obj = 1 + 3;
            //   Console.WriteLine(mvar.GetType());
            //   Console.WriteLine(dyn.GetType());
            //   Console.WriteLine(obj.GetType());

            /*
             * dynamic dyna;
             * int a = 20;
             *
             * dyna = a;
             *
             * string b = "dynamic";
             *
             * dyna = b;
             *
             * DateTime dt = DateTime.Now;
             *
             * dyna = dt;
             */

            Console.ReadKey();
        }