Fetching contributors…
Cannot retrieve contributors at this time
35 lines (25 sloc) 775 Bytes

RCS1220: Use pattern matching instead of combination of 'is' operator and cast operator

Property Value
Id RCS1220
Category Usage
Default Severity Info
Enabled by Default
Supports Fade-Out -
Supports Fade-Out Analyzer -


Code with Diagnostic

if (x is T && Foo((T)x)) // RCS1220

Code with Fix

if (x is T y && Foo(y))

See Also

(Generated with DotMarkdown)