public interface A
{
void print();
}
public class B : A
{
void A.print()
{
Console.WriteLine("B");
}
}
public class C : A
{
void A.print()
{
Console.WriteLine("C");
}
}
public class MyClass
{
public static void Main()
{
A a = new C();
Console.WriteLine("#: " + a.GetType().Name);
a.print();
RL();
}
}
No comments:
Post a Comment