Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
StringBuilder AppendFormat function
Message
 
 
À
13/02/2008 12:28:25
Information générale
Forum:
ASP.NET
Catégorie:
Code, syntaxe and commandes
Versions des environnements
Environment:
C# 2.0
OS:
Windows XP
Database:
MS SQL Server
Divers
Thread ID:
01292192
Message ID:
01292262
Vues:
19
>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
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform