Skip to content

Latest commit

 

History

History
36 lines (24 loc) · 617 Bytes

RCS1201.md

File metadata and controls

36 lines (24 loc) · 617 Bytes

RCS1201: Use method chaining

Property Value
Id RCS1201
Category Simplification
Severity Hidden

Example

Code with Diagnostic

sb = new StringBuilder();

sb.Append("a"); // RCS1201
sb.Append("b");
sb.Append("c");

Code with Fix

sb = new StringBuilder();

sb.Append("a")
    .Append("b")
    .Append("c");

See Also

(Generated with DotMarkdown)