给定以下代码,我从 Shape 继承了一个类 Circle:
class Shape
{
void Draw();
}
class Circle : Shape
{
}
void Main(string[] args)
{
Shape s = new Shape();
Shape s2 = new Shape();
Circle c = new Circle();
List<Shape> ShapeList = new List<Shape>();
ShapeList.Add(s);
ShapeList.Add(s2);
ShapeList.Add(c);
}
怎样才能c
加进去ShapeList
?