Kyle Schoonover created AVRO-3491:
-------------------------------------
Summary: Fix IDE0020 Use pattern matching to avoid 'is' check
followed by a cast
Key: AVRO-3491
URL: https://issues.apache.org/jira/browse/AVRO-3491
Project: Apache Avro
Issue Type: Sub-task
Components: csharp
Reporter: Kyle Schoonover
Fix For: 1.12.0
{code:java}
// csharp_style_pattern_matching_over_is_with_cast_check = true
if (o is int i) {...}
// csharp_style_pattern_matching_over_is_with_cast_check = false
if (o is int) {var i = (int)o; ... } {code}
For Reference: [Use pattern matching to avoid 'is' check followed by a cast
(IDE0020 and IDE0038) - .NET | Microsoft
Docs|https://docs.microsoft.com/en-us/dotnet/fundamentals/code-analysis/style-rules/ide0020-ide0038]
--
This message was sent by Atlassian Jira
(v8.20.1#820001)