using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace PersonDemo2
{
/// <summary>
/// 1 调用父类的属性和方法(公开的 protected(字段))
/// 2 调用父类的构造函数 分配内存空间
/// </summary>
class Stu:Person,IFlyable
{
public Stu()
{
}
public override void Speak(string msg)
{
Console.WriteLine(base.name+"说"+msg);
}
public void Study()
{
Console.WriteLine("good good study !day day up");
}
#region IFlyable 成员
public void Fly()
{
Console.WriteLine("i can fly");
}
#endregion
}
}