Esempio n. 1
0
        public void Show(object ob)
        {
            // casting object to Employ
            //string x = (String)ob;
            Employ x = (Employ)ob;

            Console.WriteLine("Empno {0} Name {1} Sal {2}", x.empno, x.name, x.basic);
        }
Esempio n. 2
0
        static void Main(string[] args)
        {
            Employ e = new Employ();

            e.empno = 1;
            e.name  = "Arun";
            e.basic = 88234;
            new Demo().Show(e);
        }