hello
i would like to perform a method overloading with inheritance
my code is :
public abstract class Shape
{
protected Point position ;
public Shape(int x, int y)
{
position = new Point(x , y);
}
public void show()
{
position.show();
}
}
public class Rectangle : Shape
{
protected Size sizexy ;
public Rectangle(uint x, uint y, int a, int b) : base (a,b)
{
sizexy = new Size(x, y) ;
}
public Rectangle(Point p, Size s) : base(p.pgsx, p.pgsy)
{
sizexy = new Size(s.gsx, s.gsy);
}
public void show ()
{
Console.WriteLine("Rect size (" + sizexy.gsx.ToString() + "," + sizexy.gsy.ToString() + ") ");
base.show();
}
}
when i run show method on rectangle it only preforms base.show without console.....
it also gives me a warning : something about hiding inherited member.
how can i fix this ?