Ejemplo n.º 1
0
        static void Main(string[] args)
        {
            Console.WriteLine("Hello World!");
            MyGenericClss <int> mgc = new MyGenericClss <int>(10);

            mgc.genericMethod(100);
            GenericClass gc = new GenericClass();

            gc.Show("sameena");
            gc.Show(472);
            gc.Show('S');
        }
Ejemplo n.º 2
0
        static void Main(string[] args)
        {
            GenericClass <string> gen   = new GenericClass <string>("This is generic class");
            GenericClass <int>    genI  = new GenericClass <int>(101);
            GenericClass <char>   getCh = new GenericClass <char>('I');
            GenericClass          genC  = new GenericClass();

            genC.Show("This is generic method");
            genC.Show(101);
            genC.Show('I');
            Console.ReadKey();
        }