String vs String Builder(C#)
Difference between String and String Builder C#
Strings in C#
String is immutable in C# that would mean you couldn’t modify it after it is created. It creates a new object of string type in memory if you will perform any operation.
StringBuilder is mutable in C#.
This means that if an operation is performed on the string, it will not create a new instance every time. With that, it will not create new space in memory, unlike Strings.
Last updated
Was this helpful?