From db90a795f5280ead19d5cc1780e9e25aad29fb8d Mon Sep 17 00:00:00 2001 From: Ilya Date: Tue, 2 Jul 2019 17:54:03 +0500 Subject: [PATCH] Reduce allocations in GetLocale() (#25531) --- src/System.Private.CoreLib/src/System/Reflection/RuntimeAssembly.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/System.Private.CoreLib/src/System/Reflection/RuntimeAssembly.cs b/src/System.Private.CoreLib/src/System/Reflection/RuntimeAssembly.cs index 8c60a92..92cd2b8 100644 --- a/src/System.Private.CoreLib/src/System/Reflection/RuntimeAssembly.cs +++ b/src/System.Private.CoreLib/src/System/Reflection/RuntimeAssembly.cs @@ -545,7 +545,7 @@ namespace System.Reflection if (locale == null) return CultureInfo.InvariantCulture; - return new CultureInfo(locale); + return CultureInfo.GetCultureInfo(locale); } [MethodImplAttribute(MethodImplOptions.InternalCall)] -- 2.7.4