SystemStringBuilder and SystemString class

Write the difference between System.StringBuilder and System.String classes?

E

Expert

Verified

String and StringBuilder classes are utilizing to store string values however the dissimilarity in them is that the String is immutable (i.e. read only) by nature, since a value once alloted to a String object cannot be altered after its creation. When the value in the String object is customized, a new object is produced, in memory, through a new value alloted to the String object. Alternatively, the StringBuilder class is mutable; as it engages the similar space still if you change the value. A StringBuilder class is well-organized where you have to carry out a large amount of string manipulation.

   Related Questions in DOT NET Programming

©TutorsGlobe All rights reserved 2022-2023.