String
The string is immutable, Immutable means if you create a string object then you cannot modify it and It always creates a new object of string type in memory.
Example
string strMyValue = "Hello Visitor";
// create a new string instance instead of changing the old one
strMyValue += "How Are";
strMyValue += "You ??";StringBuilder
StringBuilder is mutable, which means if create a string builder object then you can perform any operation like insert, replace, or append without creating a new instance every time. it will update the string in one place in memory and doesn't create new space in memory.
Example
StringBuilder sbMyValue = new StringBuilder("");
sbMyValue.Append("Hello Visitor");
sbMyValue.Append("How Are You ??");
string strMyValue = sbMyValue.ToString();

Sagar JadhavPosted Apr 7, 2023, 1:20 PM EDT
Perfect Answer.
SamPosted Nov 28, 2019, 1:02 AM EST
Nice one dear really very helpfull
Anjaneyulu CharyPosted May 12, 2019, 9:08 PM EDT
Explanation is very clear. Easy to understand. Thanks for sharing this article.
hosam hemailyPosted Aug 28, 2018, 9:54 PM EDT
Very nice explanation
Manojkumar KPosted Sep 25, 2017, 2:57 AM EDT
Very easy to understand. Thanks
Dinesh Kumar SharmaPosted Jul 31, 2017, 5:36 AM EDT
Thank for shared this article.
Saurabh TanwerPosted Jul 7, 2016, 10:06 PM EDT
Why to use StringBuilder over String , garbage collector gonna free up extra memory at the end , why should bother with memory management and with stringbuilder class ?
Saurabh TanwerPosted Jul 7, 2016, 10:05 PM EDT
Http://www.dotnetlearners.com/blogs/view/180/Difference-between-String-and-StringBuilder.aspx
Azhar AbbasiPosted May 16, 2016, 7:24 AM EDT
you made it simple bro thumb up!
rkraju mPosted Nov 6, 2015, 3:52 AM EST
http://www.dotnetlearners.com/blogs/view/180/Difference-between-String-and-StringBuilder.aspx
TechoschoolPosted Mar 26, 2015, 8:25 AM EDT
For more easy and nice explanation of difference between string and stringbuilder in c# follow this link- http://techoschool.com/Blog/Latest/Difference-between-string-and-StringBuilder
Shamseer KPosted Feb 13, 2015, 8:17 AM EST
Nice,For Further explanations there is a nice article about the same topic with practical examples.follow this link http://dotnetmob.com/difference-between-string-and-stringbuilder-in-csharp/
Chris EarglePosted Jun 30, 2014, 4:12 AM EDT
Your article made me consider how one describes the benefit of StringBuilder. It is more memory efficient when appending a large amount of data (particularly of unknown quantity) since it doesn't need to reallocate memory for prior data.
Chris EarglePosted Jun 26, 2014, 6:25 AM EDT
It kinda does create new space in memory since appending a line internally creates a new StringBuilder (that it links to).