Skip to content

Commit

Permalink
Simplify string join operation
Browse files Browse the repository at this point in the history
  • Loading branch information
sharwell committed Nov 8, 2019
1 parent 27b044d commit 8869fb9
Showing 1 changed file with 1 addition and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -297,16 +297,7 @@ protected Task VerifyCSharpDiagnosticAsync(string source, DiagnosticResult[] exp
protected virtual string BuildTestCode(string format)
{
StringBuilder argumentList = new StringBuilder();
foreach (var argument in this.InitialArguments)
{
if (argumentList.Length > 0)
{
argumentList.Append(", ");
}

argumentList.Append(argument);
}

argumentList.Append(string.Join(", ", this.InitialArguments));
if (argumentList.Length > 0)
{
argumentList.Append(", ");
Expand Down

0 comments on commit 8869fb9

Please sign in to comment.