CSharp examples for Language Basics:StringBuilder
Make String using StringBuilder
using System;//from ww w .j ava 2s .c o m using System.Text; class StringMaker { public static void Main() { string finalFairyTale; StringBuilder fairyTaleBeingWritten = new StringBuilder("Once upon a time"); fairyTaleBeingWritten.Append(" a beautiful princess"); fairyTaleBeingWritten.Append(" lived in a big castle"); finalFairyTale = fairyTaleBeingWritten.ToString(); Console.WriteLine(finalFairyTale); } }