Home > DeveloperSection > Interviews > What are differences between system.stringbuilder and system.string?

Posted on    November-20-2014 11:00 PM

 .NET C#  .NET  String 
 1 Answer(s)
  867  View(s)
Rate this:

Sumit Kesarwani

Total Post:782

Posted on    November-21-2014 12:00 AM

The main difference is system.string is immutable and system.stringbuilder is a mutable. Append keyword is used in string builder but not in system.string.

Immutable means once we created we cannot modified. Suppose if we want give new value to old value simply it will discarded the old value and it will create new instance in memory to hold the new value.

Don't want to miss updates? Please click the below button!

Follow MindStick