From: Stephen Toub Date: Mon, 29 Jan 2018 17:01:12 +0000 (-0500) Subject: Use corelib-shared ValueStringBuilder X-Git-Tag: accepted/tizen/unified/20190422.045933~3172 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=7221733d04c7205a538792cded158bd0ed0218cb;p=platform%2Fupstream%2Fcoreclr.git Use corelib-shared ValueStringBuilder Use the shared version, delete the copy. Signed-off-by: dotnet-bot-corefx-mirror --- diff --git a/src/mscorlib/shared/System/Text/ValueStringBuilder.cs b/src/mscorlib/shared/System/Text/ValueStringBuilder.cs index 0a91eb0..84e5fa8 100644 --- a/src/mscorlib/shared/System/Text/ValueStringBuilder.cs +++ b/src/mscorlib/shared/System/Text/ValueStringBuilder.cs @@ -21,7 +21,22 @@ namespace System.Text _pos = 0; } - public int Length => _pos; + public int Length + { + get => _pos; + set + { + int delta = value - _pos; + if (delta > 0) + { + Append('\0', delta); + } + else + { + _pos = value; + } + } + } public override string ToString() {