public void Example()

in Older/ReSharper20171CSharp/PatternMatching.cs [7:22]


        public void Example(Shape shape)
        {
            // Pattern matching
            switch (shape)
            {
                case Circle c:
                    Console.WriteLine($"circle with radius {c.Radius}");
                    break;
                case Rectangle s when s.Length == s.Height:
                    Console.WriteLine($"{s.Length} x {s.Height} square");
                    break;
                case Rectangle r:
                    Console.WriteLine($"{r.Length} x {r.Height} rectangle");
                    break;
            }
        }