The text of this article is not in this database — only its details are. Read it on the old site: Modification in string using Stringbuilder class in C#
4 Comments
Join the conversation! Your thoughts help the community grow.
Sign in to leave a comment.

Gowtham RajamanickamPosted Apr 7, 2016, 3:00 AM
good one..
Nico GerberPosted Jul 28, 2010, 10:03 AM
You are using the mutable StringBuilder objects as though they are immutable. This is more accurate: StringBuilder String1 = new StringBuilder("beautiful"); StringBuilder String2 = new StringBuilder(); //String1=beautiful //String2= String2 = String1.Append(" Picture"); //String1=beautiful Picture //String2=beautiful Picture String2 = String1.Remove(2, 4); //String1=beful Picture //String2=beful Picture String2 = String1.Insert(2, "auti"); //String1=beautiful Picture //String2=beautiful Picture String2 = String1.Replace("beautiful", "Wonderful"); //String1=Wonderful Picture //String2=Wonderful Picture