From c3a0bd5951bf97cd214e10149124e21d835238bf Mon Sep 17 00:00:00 2001 From: svsubith <40054804+svsubith@users.noreply.github.com> Date: Wed, 23 Dec 2020 08:54:18 +0530 Subject: [PATCH] Update README.md Enriched the good example of LSP. --- README.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index d44215e..ce837fc 100644 --- a/README.md +++ b/README.md @@ -2141,15 +2141,15 @@ class Square : ShapeBase } } -Drawable RenderLargeRectangles(Rectangle rectangles) +Drawable RenderLargeRectangles(ShapeBase[] shapes) { - foreach (rectangle in rectangles) + foreach (shape in shapes) { - if (rectangle is Square) + if (shape is Square) { rectangle.SetLength(5); } - else if (rectangle is Rectangle) + else if (shape is Rectangle) { rectangle.SetWidth(4); rectangle.SetHeight(5);