dotgnu-general
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[DotGNU]ECMA doubt .. function overloading


From: Gopal V
Subject: [DotGNU]ECMA doubt .. function overloading
Date: Fri, 8 Nov 2002 18:37:15 +0530
User-agent: Mutt/1.2.5i

using System;
public class Parent
{
        public void Foo(int x)
        {
                Console.WriteLine("Parent");
        }
}
public class Child: Parent
{
        public void Foo(float x)
        {
                Console.WriteLine("Child");
        }
}
public class Test
{
        public static void Main()
        {
                Child c=new Child();
                c.Foo(42);
        }
}

Could someone test this ? 

AFAIK, it should print "Child" ... but I had this mailed to me as a
bug report ... (should print "Parent").

Gopal
-- 
The difference between insanity and genius is measured by success


reply via email to

[Prev in Thread] Current Thread [Next in Thread]