You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
StringBuilder has several overloads, but none of them work with an interpolated string without first turning it into a string. Given that purpose of the StringBuilder is performance, it seems like turning the interpolation into a string first is going to give a performance hit.
Proposed API
namespace System.Text
{
public sealed class StringBuilder : System.Runtime.Serialization.ISerializable
{
+ public StringBuilder AppendFormat(IFormattable)
}
}
Background and Motivation
StringBuilder has several overloads, but none of them work with an interpolated string without first turning it into a string. Given that purpose of the StringBuilder is performance, it seems like turning the interpolation into a string first is going to give a performance hit.
Proposed API
namespace System.Text { public sealed class StringBuilder : System.Runtime.Serialization.ISerializable { + public StringBuilder AppendFormat(IFormattable) } }
Usage Examples
-->
Risks
It's possible that the implementation for the overload would be slower than sb.AppendFormat("{0}, {1}", lastName, firstName);
The text was updated successfully, but these errors were encountered: