Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
StringBuilder AppendFormat function
Message
 
 
General information
Forum:
ASP.NET
Category:
Coding, syntax and commands
Environment versions
Environment:
C# 2.0
OS:
Windows XP
Database:
MS SQL Server
Miscellaneous
Thread ID:
01292192
Message ID:
01292262
Views:
17
>You can use any of these variations (the second is probably what you need in this instance):
>sb.AppendLine();
>sb.AppendFormat("Hello {0}, {1}" + Environment.NewLine, "Fred", "Bill");
>sb.AppendFormat("Hello {0}, {1}\r\n", "Fred", "Bill");
>sb.Append("Another Line" +Environment.NewLine);
>sb.AppendLine("And another");
>If you want to see what they really look like in the debugger use the 'Text Visualizer' option in a Watch window

I'll leave the code as is now, but I agree that the second variation is easier to read.
If it's not broken, fix it until it is.


My Blog
Previous
Reply
Map
View

Click here to load this message in the networking platform