日期:2014-05-17 浏览次数:21011 次
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Diagnostics;
namespace Csharp
{
class Animal
{
public void speak()
{
Console.WriteLine("I am Animal");
}
}
class Monkey : Animal
{
public void speak()
{
Console.WriteLine("I am Monkey");
}
}
class People : Monkey
{
public void speak()
{
base.base.speak();
Console.WriteLine("and");
Console.WriteLine("I am People");
}
}
class Program
{
static void Main(string[] args)
{
People p = new People();
p.speak();
Console.ReadKey();
}
}
}
class Animal
{
public void speak()
{
Console.WriteLine("I am Animal");
}
}
class Monkey : Animal