Skip to content

Latest commit

 

History

History
44 lines (28 loc) · 690 Bytes

RCS1151.md

File metadata and controls

44 lines (28 loc) · 690 Bytes

RCS1151: Remove redundant cast

Property Value
Id RCS1151
Category Redundancy
Severity Hidden

Examples

Code with Diagnostic

var b = new Base();

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

Code with Fix

b.Bar();

Code with Diagnostic

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

Code with Fix

IEnumerable<string> x = EnumerateStrings();

See Also

(Generated with DotMarkdown)