AppendLineFormat
Appends a formatted string and the default line terminator to to this StringBuilder instance.
Source
public static StringBuilder AppendLineFormat(this StringBuilder builder, string format, params object[] arguments)
{
string value = String.Format(format, arguments);
builder.AppendLine(value);
return builder;
}
Example
StringBuilder builder = new StringBuilder();
builder.AppendLineFormat("File name: {0} (line: {1}, column: {2})", fileName, lineNumber, column);
builder.AppendLineFormat("Message: {0}", exception.Message);
Author: Koen Rouwhorst
Submitted on: 21 nov. 2010
Language: C#
Type: System.Text.StringBuilder
Views: 8009