Permalink
Browse files

use StringBuilder for consistent line endings

  • Loading branch information...
1 parent f28c089 commit c9c7dfb6f5f0507c7c7e71b924184487d5c87fc7 @rcd committed Mar 15, 2013
Showing with 13 additions and 13 deletions.
  1. +13 −13 DICOM/Network/DicomMessage.cs
@@ -84,27 +84,27 @@ public class DicomMessage {
}
public string ToString(bool printDatasets) {
- var output = ToString();
+ var output = new StringBuilder(ToString());
if (!printDatasets)
- return output;
+ return output.ToString();
- output += "\n";
- output += "--------------------------------------------------------------------------------\n";
- output += " DIMSE Command:\n";
- output += "--------------------------------------------------------------------------------\n";
- output += Command.WriteToString();
+ output.AppendLine();
+ output.AppendLine("--------------------------------------------------------------------------------");
+ output.AppendLine(" DIMSE Command:");
+ output.AppendLine("--------------------------------------------------------------------------------");
+ output.AppendLine(Command.WriteToString());
if (HasDataset) {
- output += "--------------------------------------------------------------------------------\n";
- output += " DIMSE Dataset:\n";
- output += "--------------------------------------------------------------------------------\n";
- output += Dataset.WriteToString();
+ output.AppendLine("--------------------------------------------------------------------------------");
+ output.AppendLine(" DIMSE Dataset:");
+ output.AppendLine("--------------------------------------------------------------------------------");
+ output.AppendLine(Dataset.WriteToString());
}
- output += "--------------------------------------------------------------------------------";
+ output.AppendLine("--------------------------------------------------------------------------------");
- return output;
+ return output.ToString();
}
public static string ToString(DicomCommandField type) {

0 comments on commit c9c7dfb

Please sign in to comment.