public int Width { get; set; }
public int Height { get; set; }
public Rectangle(int width, int height)
private void DrawLine(int width, char mid, char end)
for(int i = 0; i < width - 1; ++i)
DrawLine(this.width, '*', '*');
for(int i = 1; i < this.height - 1; i++)
DrawLine(this.width, ' ', '*');
DrawLine(this.width, '*', '*');
public static void Main()
int width = 10; int height = 30; Rectangle rectangle = new Rectangle(width, height);