Use TryFormat in StringBuilder
authorStephen Toub <stoub@microsoft.com>
Fri, 17 Nov 2017 00:05:50 +0000 (19:05 -0500)
committerStephen Toub <stoub@microsoft.com>
Sat, 18 Nov 2017 22:59:16 +0000 (17:59 -0500)
commit81b2ef422e73b304842f42e81e8f2a4a69d8f4e1
tree9a9a99b90776e8d35c2554fca6a025e07de07f09
parenteddf809cabd6de8d9fee5f50f29973db08e6132c
Use TryFormat in StringBuilder

Avoid string allocations when appending primitives to StringBuilder.  We try to format into the existing array space, and only fall back to using ToString when there isn't enough room and we're going to grow the builder anyway.
src/mscorlib/shared/System/Text/StringBuilder.cs