Skip to content

Commit

Permalink
Replace string concat with join to increase performances
Browse files Browse the repository at this point in the history
  • Loading branch information
luigiberrettini committed Feb 8, 2016
1 parent 2675ef8 commit 1d3b37e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/NLog.Targets.Syslog/NLog.Targets.Syslog.cs
Original file line number Diff line number Diff line change
Expand Up @@ -227,7 +227,7 @@ private byte[] BuildSyslogMessage(SyslogFacility facility, SyslogSeverity priori
sender = sender + ": ";

string[] strParams = { pri, timeToString, machine, sender, body, Environment.NewLine };
return Encoding.ASCII.GetBytes(string.Concat(strParams));
return Encoding.ASCII.GetBytes(string.Join(string.Empty, strParams));
}
}
}

0 comments on commit 1d3b37e

Please sign in to comment.