Fetching contributors…
Cannot retrieve contributors at this time
47 lines (31 sloc) 920 Bytes

RCS1151: Remove redundant cast

Property Value
Id RCS1151
Category Redundancy
Default Severity Hidden
Enabled by Default
Supports Fade-Out
Supports Fade-Out Analyzer -


Code with Diagnostic

var b = new Base();

((Foo)b).Bar(); // RCS1151

Code with Fix


Code with Diagnostic

IEnumerable<string> x = EnumerateStrings().Cast<string>(); // RCS1151

Code with Fix

IEnumerable<string> x = EnumerateStrings();

See Also

(Generated with DotMarkdown)