C#多重继承(多层次继承)
using System;
/// <summary>
/// C#多重继承
/// </summary>
namespace MultipleInheritance
{
//线
class Line
{
protected int length;
public Line(int l = 0)
{
length = l;
}
public int area()
{
return length;
}
}
//方形
class Rectangle : Line
{
protected int width;
public Rectangle(int l = 0, int w = 0) : base(l) {
width = w;
}
public new int area()
{
&nbs