Code Analysis ReferenceAnalyzersRCS1220On this pageRCS1220: Use pattern matching instead of combination of 'is' operator and cast operatorPropertiesPropertyValueDefault SeverityInfoMinimum language version7.0ExamplesExample #1diagnostic.csif (x is T && Foo((T)x)){}fix.csif (x is T y && Foo(y)){}Applies toExtension for VS 2022Extension for VS CodeExtension for Open VSXPackage Roslynator.Analyzers