diff --git a/src/mscorlib/src/System/Enum.cs b/src/mscorlib/src/System/Enum.cs index fa674e74cf12..b0e3bf8f07e9 100644 --- a/src/mscorlib/src/System/Enum.cs +++ b/src/mscorlib/src/System/Enum.cs @@ -428,7 +428,7 @@ private static bool TryParseEnum(Type enumType, String value, bool ignoreCase, r StringComparison.OrdinalIgnoreCase : StringComparison.Ordinal; - int valueIndex = 0; + int valueIndex = firstNonWhitespaceIndex; while (valueIndex <= value.Length) // '=' is to handle invalid case of an ending comma { // Find the next separator, if there is one, otherwise the end of the string.