BASE Disp() method CLASS1 Disp() method |
前田稔(Maeda Minoru)の超初心者のプログラム入門
![]()
![]()
class BASE
{
public void Disp()
{
Console.WriteLine("BASE Disp() method");
}
}
|
class CLASS1 : BASE
{
public new void Disp()
{
Console.WriteLine("CLASS1 Disp() method");
}
}
|
class console
{
public static int Main()
{
BASE Base = new BASE();
CLASS1 Cls1 = new CLASS1();
Base.Disp();
Cls1.Disp();
System.Console.ReadLine();
return 0;
}
}
|
![]()