can any one explain with examples
Related Discussion: Most efficient way to concatenate strings?
String is immutable ,,
That means we cannot change the string once declared .
String builder is mutable
This is the variety operation can be performed.we can change string ..
You cannot edit the value of a string, each method of the string object returns a new string instead of altering the original. StringBuilder on the other hand can alter it's content (adding new strings for example).
string original = "the brown fox jumped over the lazy dog";
string altered = original.Insert(original.IndexOf("fox"), "cat");
// altered = the brown cat jumped over the lazy dog
You cannot change the content of the original string unless you create a new string, or re-reference the instance to another string object.