How the StringBuilder class is implemented? Does it internally create new string objects each time we append?
In .NET 2.0 it uses the String class internally. String is only immutable outside of the System namespace, so StringBuilder can do that. In .NET 4.0 String was changed to use char[]. In 2.0 StringBuilder looked like this public sealed class StringBuilder : ISerializable { // Fields private const string CapacityField = “Capacity”; internal const … Read more