Use pattern matching
This refactoring applies to:
- C#
What: Use pattern matching.
When: You want to use the new C# pattern matching capabilities.
Why: This refactoring will make your code more clear and concise.
How-to
Place your caret inside the statement.
Press Ctrl+. to trigger the Quick Actions and Refactorings menu.
Select Use pattern matching.
See also
Feedback
https://aka.ms/ContentUserFeedback.
Coming soon: Throughout 2024 we will be phasing out GitHub Issues as the feedback mechanism for content and replacing it with a new feedback system. For more information see:Submit and view feedback for