DateTimeFormat: Avoid intermediate char[] allocation (dotnet/coreclr#6863)
authorJustin Van Patten <jvp@justinvp.com>
Wed, 24 Aug 2016 03:16:22 +0000 (20:16 -0700)
committerJan Kotas <jkotas@microsoft.com>
Wed, 24 Aug 2016 03:16:22 +0000 (20:16 -0700)
commita6c5320e08b49eb5f9772af8f2f00d30c8a21820
treeaae7cd8b4051ca26b0f5580a662450753d8038fa
parent1ecc68b3c21043e686f5f76eaeb4f2a7acea2557
DateTimeFormat: Avoid intermediate char[] allocation (dotnet/coreclr#6863)

An unnecessary intermediate char[] allocation can be avoided by calling
`new string(c, 1)` instead of `new string(new char[] { c })`.

Commit migrated from https://github.com/dotnet/coreclr/commit/d014a8fab82d2ff70185ae6c29d2ae5a4074cc00
src/coreclr/src/mscorlib/src/System/Globalization/DateTimeFormat.cs