C#


ROSLYN.PERFORMANCE.CA1830 : Prefer strongly-typed Append and Insert method overloads on StringBuilder (C#)

See Roslyn-Detected C# Warning Classes for more information.

Summary

StringBuilder.Append and StringBuilder.Insert provide overloads for multiple types beyond System.String. When possible, prefer the strongly-typed overloads over using ToString() and the string-based overload.

This check corresponds to Roslyn rule CA1830. For full rule details, see the Microsoft website: CA1830.

Properties

Class Name Prefer strongly-typed Append and Insert method overloads on StringBuilder (C#)
Significance reliability
Mnemonic ROSLYN.PERFORMANCE.CA1830
Categories None
Availability Available for C# only.
Enabling Checks for this warning class are enabled by default. To disable them, add the following WARNING_FILTER rule to the project configuration file.
WARNING_FILTER += discard class="Prefer strongly-typed Append and Insert method overloads on StringBuilder (C#)"

Relevant Configuration File Parameters

The following configuration file parameters affect checks for this warning class.