diff --git a/src/System.Private.CoreLib/src/System/AppContextDefaultValues.cs b/src/System.Private.CoreLib/src/System/AppContextDefaultValues.cs index a838dfd0f..a0093c94a 100644 --- a/src/System.Private.CoreLib/src/System/AppContextDefaultValues.cs +++ b/src/System.Private.CoreLib/src/System/AppContextDefaultValues.cs @@ -100,7 +100,7 @@ namespace System { value = value.Substring(1); } - Version realVersion = new Version(value); + Version realVersion = Version.Parse(value); // The version class will represent some unset values as -1 internally (instead of 0). version = realVersion.Major * 10000; if (realVersion.Minor > 0) diff --git a/src/System.Private.CoreLib/src/System/Resources/ResourceManager.cs b/src/System.Private.CoreLib/src/System/Resources/ResourceManager.cs index 3a37f29f8..836ad90fa 100644 --- a/src/System.Private.CoreLib/src/System/Resources/ResourceManager.cs +++ b/src/System.Private.CoreLib/src/System/Resources/ResourceManager.cs @@ -748,7 +748,7 @@ namespace System.Resources Version ver; try { - ver = new Version(v); + ver = Version.Parse(v); } catch (ArgumentOutOfRangeException e) {