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

RCS1172: Use 'is' operator instead of 'as' operator

Property Value
Id RCS1172
Category Simplification
Default Severity Warning
Enabled by Default
Supports Fade-Out -
Supports Fade-Out Analyzer -

Example

Code with Diagnostic

if (x as string != null) // RCS1172
{
}

Code with Fix

if (x is string)
{
}

See Also

(Generated with DotMarkdown)