Exemplo n.º 1
0
        static void Main(string[] args)
        {
            OverrideMethod om = new OverrideMethod();

            om.Print(100);
            om.Print(3.14);

            GenericMethod gm = new GenericMethod();

            gm.Print <int>(100);
            gm.Print <string>("Generic Method");
        }
Exemplo n.º 2
0
        static void Main(string[] args)
        {
            OverrideMethod om = new OverrideMethod();

            om.Print(1);
            om.Print(3.14);
            om.Print("Hello World");

            GenericMethod gm = new GenericMethod();

            gm.Print <int>(1);
            gm.Print <double>(3.14);
            gm.Print <string>("Hello World");
        }