[
https://issues.apache.org/jira/browse/AVRO-3491?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Martin Tzvetanov Grigorov resolved AVRO-3491.
---------------------------------------------
Fix Version/s: 1.11.1
Assignee: Kyle Schoonover
Resolution: Fixed
> 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
> Assignee: Kyle Schoonover
> Priority: Minor
> Labels: pull-request-available
> Fix For: 1.11.1, 1.12.0
>
> Time Spent: 40m
> Remaining Estimate: 0h
>
> {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.7#820007)