|
Close (X)
|
|
Sometimes, as may be the case with code or a SQL query, you may want to preserve blank lines in your string or Stringbuilder code for readability purposes:
|
// Sample code follows
for(int i=0; i<5; i++)
{
Console.WriteLine("Current Count: " + i.ToString());
}
Console.WriteLine("Final Count: " + i.ToString());
|
|
Checking this box will preserve your blank lines in the output:
|
StringBuilder sb = new StringBuilder();
sb.Append("// Sample code follows");
sb.Append("");
sb.Append("for(int i=0; i<5; i++) ");
sb.Append(" {");
sb.Append(" Console.WriteLine(\"Current Count: \" + i.ToString());");
sb.Append(" }");
sb.Append("");
sb.Append("Console.WriteLine(\"Final Count: \" + i.ToString());");
|
|
Or, leave this box unchecked and blank lines in the input will not be included in the output:
|
StringBuilder sb = new StringBuilder();
sb.Append("// Sample code follows");
sb.Append("for(int i=0; i<5; i++) ");
sb.Append(" {");
sb.Append(" Console.WriteLine(\"Current Count: \" + i.ToString());");
sb.Append(" }");
sb.Append("Console.WriteLine(\"Final Count: \" + i.ToString());");
|
Note that if you select the option to preserve blank lines AND any of the options that include additional characters at the end of each line, the output will append these characters to your blank lines as well.
|
|
Close (X)
|