Difference Between String and String Builder ?

String is collection of char objects . String is immutable ( read only ) since its value cannot be modified once it is created . It belongs to System namespace .
String concatenation always creates a new object from existing string and new data
StringBuilder is mutable string of characters . It belongs to System.Text namespace. StringBuilder does not creates a new object

No comments:

Popular Posts