Fix ordering of checks in AppendInterpolatedStringHandler.AppendFormatted (#79539)
authorStephen Toub <stoub@microsoft.com>
Tue, 13 Dec 2022 22:51:17 +0000 (17:51 -0500)
committerGitHub <noreply@github.com>
Tue, 13 Dec 2022 22:51:17 +0000 (17:51 -0500)
commitc1d6dd3cadb9387cd41b079a4f92d784413386ed
treedb7502e6b06fc478512e75abe1da8a0928010876
parentc03de20e23ce8419cf3918500edf555504a8aee9
Fix ordering of checks in AppendInterpolatedStringHandler.AppendFormatted (#79539)

We want to check for IsEnum first to avoid boxing the enum via ISpanFormattable.TryFormat.  This just swaps the two blocks.
src/libraries/System.Private.CoreLib/src/System/Text/StringBuilder.cs