Mega Code Archive

 
Categories / C# / Development Class
 

Appends the default line terminator to the end of the current StringBuilder object

using System; using System.Text; class Sample  {     public static void Main()      {         StringBuilder sb = new StringBuilder();         string        line = "A line of text.";         int           number = 123;              sb.AppendLine("The first line of text.");         sb.AppendLine(line);              Console.WriteLine(sb.ToString());     } }