-
-
Save dimitris-papadimitriou-chr/e93d461a948607f5ed3b40e2dee0677a to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| string GetShapeDescription(Shape shape) | |
| => shape.MatchWith<string>( | |
| rectangleCase: r => $"Found {r.Height}x {r.Width} rectangle", | |
| circleCase: c => $"found a circle with radius {c.Radius}" | |
| ); | |
| var description = GetShapeDescription(shape); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment