From: Justin Van Patten Date: Fri, 9 Dec 2016 00:44:20 +0000 (-0800) Subject: TimeZoneInfo: Use string.Concat instead of string.Format (dotnet/coreclr#8540) X-Git-Tag: submit/tizen/20210909.063632~11030^2~8668 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=b917ac001c9926af036d6424d41c25aada47945a;p=platform%2Fupstream%2Fdotnet%2Fruntime.git TimeZoneInfo: Use string.Concat instead of string.Format (dotnet/coreclr#8540) It's more efficient to concatenate the strings. Commit migrated from https://github.com/dotnet/coreclr/commit/2d56f76c0a7a44e194104e54e5e9c66feba3e931 --- diff --git a/src/coreclr/src/mscorlib/src/System/TimeZoneInfo.cs b/src/coreclr/src/mscorlib/src/System/TimeZoneInfo.cs index 7d26f83..7758b4e 100644 --- a/src/coreclr/src/mscorlib/src/System/TimeZoneInfo.cs +++ b/src/coreclr/src/mscorlib/src/System/TimeZoneInfo.cs @@ -2971,8 +2971,7 @@ namespace System { try { using (RegistryKey dynamicKey = Registry.LocalMachine.OpenSubKey( - String.Format(CultureInfo.InvariantCulture, "{0}\\{1}\\Dynamic DST", - c_timeZonesRegistryHive, id), + c_timeZonesRegistryHive + "\\" + id + "\\Dynamic DST", #if FEATURE_MACL RegistryKeyPermissionCheck.Default, System.Security.AccessControl.RegistryRights.ReadKey @@ -3141,8 +3140,7 @@ namespace System { permSet.Assert(); using (RegistryKey key = Registry.LocalMachine.OpenSubKey( - String.Format(CultureInfo.InvariantCulture, "{0}\\{1}", - c_timeZonesRegistryHive, id), + c_timeZonesRegistryHive + "\\" + id, #if FEATURE_MACL RegistryKeyPermissionCheck.Default, System.Security.AccessControl.RegistryRights.ReadKey @@ -3411,8 +3409,7 @@ namespace System { permSet.Assert(); using (RegistryKey key = Registry.LocalMachine.OpenSubKey( - String.Format(CultureInfo.InvariantCulture, "{0}\\{1}", - c_timeZonesRegistryHive, id), + c_timeZonesRegistryHive + "\\" + id, #if FEATURE_MACL RegistryKeyPermissionCheck.Default, System.Security.AccessControl.RegistryRights.ReadKey