mirror of
https://github.com/markjprice/cs11dotnet7.git
synced 2025-12-06 05:32:03 +01:00
26 lines
363 B
C#
26 lines
363 B
C#
namespace Packt.Shared;
|
|
|
|
public class Square : Rectangle
|
|
{
|
|
public Square() { }
|
|
|
|
public Square(double width) : base(height: width, width: width) { }
|
|
|
|
public override double Height
|
|
{
|
|
set
|
|
{
|
|
height = value;
|
|
width = value;
|
|
}
|
|
}
|
|
|
|
public override double Width
|
|
{
|
|
set
|
|
{
|
|
height = value;
|
|
width = value;
|
|
}
|
|
}
|
|
} |