Skip to content
This repository was archived by the owner on Jan 23, 2023. It is now read-only.

Commit 41d23b0

Browse files
justinvpjkotas
authored andcommitted
AggregateException: Use StringBuilder.AppendFormat (#15747)
Use `AppendFormat(...)` instead of `Append(string.Format(...))` and `AppendLine()` instead of `Append(Environment.NewLine)`.
1 parent b2e86cf commit 41d23b0

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/mscorlib/shared/System/AggregateException.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -453,12 +453,12 @@ public override string ToString()
453453

454454
for (int i = 0; i < m_innerExceptions.Count; i++)
455455
{
456-
text.Append(Environment.NewLine);
456+
text.AppendLine();
457457
text.Append("---> ");
458-
text.Append(string.Format(CultureInfo.InvariantCulture, SR.AggregateException_InnerException, i));
458+
text.AppendFormat(CultureInfo.InvariantCulture, SR.AggregateException_InnerException, i);
459459
text.Append(m_innerExceptions[i].ToString());
460460
text.Append("<---");
461-
text.Append(Environment.NewLine);
461+
text.AppendLine();
462462
}
463463

464464
return text.ToString();

0 commit comments

Comments
 (0)