What is the use of AppendLine in StringBuilder?

 Posted by Rajesh_Kumar on 1/20/2014 | Category: C# Interview questions | Views: 1423 | Points: 40

AppendLine method is used to Append string value in a New Line.

StringBuilder sb = new StringBuilder();

sb.AppendLine("Rajesh Kumar");
sb.AppendLine(" Sathua");

//Output would be:Rajesh Kumar
Sathua //new line

Asked In: Many Interviews | Alert Moderator 

Comments or Responses

Login to post response