using System;
class BaseClass
{
public BaseClass()
{
string s="BaseClass";
Console.WriteLine(s);
}
}
class DerivedClass1 : BaseClass
{
string l="DerivedClass1";
public DerivedClass1()
{
Console.WriteLine(l);
}
}
class DerivedClass2:DerivedClass1
{
string m="DerivedClass2";
public DerivedClass2()
{
Console.WriteLine(m);
}
}
class MainClass
{
static void Main()
{
DerivedClass2 drv = new DerivedClass2();
}
}
0 コメント:
コメントを投稿