diff --git a/eng/CodeAnalysis.src.globalconfig b/eng/CodeAnalysis.src.globalconfig index 36a3ff9f2eb14..de0d6e8137e0b 100644 --- a/eng/CodeAnalysis.src.globalconfig +++ b/eng/CodeAnalysis.src.globalconfig @@ -477,6 +477,9 @@ dotnet_diagnostic.CA1861.severity = warning # CA1862: Prefer using 'StringComparer'/'StringComparison' to perform case-insensitive string comparisons dotnet_diagnostic.CA1862.severity = warning +# CA1863: Use 'CompositeFormat' +dotnet_diagnostic.CA1863.severity = suggestion + # CA1864: Prefer the 'IDictionary.TryAdd(TKey, TValue)' method dotnet_diagnostic.CA1864.severity = warning diff --git a/eng/CodeAnalysis.test.globalconfig b/eng/CodeAnalysis.test.globalconfig index d884d9f4efc1e..3312010ea716c 100644 --- a/eng/CodeAnalysis.test.globalconfig +++ b/eng/CodeAnalysis.test.globalconfig @@ -474,6 +474,9 @@ dotnet_diagnostic.CA1861.severity = none # CA1862: Prefer using 'StringComparer'/'StringComparison' to perform case-insensitive string comparisons dotnet_diagnostic.CA1862.severity = none +# CA1863: Use 'CompositeFormat' +dotnet_diagnostic.CA1863.severity = none + # CA1864: Prefer the 'IDictionary.TryAdd(TKey, TValue)' method dotnet_diagnostic.CA1864.severity = none diff --git a/src/coreclr/System.Private.CoreLib/src/System/RuntimeType.CoreCLR.cs b/src/coreclr/System.Private.CoreLib/src/System/RuntimeType.CoreCLR.cs index b56d32a090592..959489be1c7bb 100644 --- a/src/coreclr/System.Private.CoreLib/src/System/RuntimeType.CoreCLR.cs +++ b/src/coreclr/System.Private.CoreLib/src/System/RuntimeType.CoreCLR.cs @@ -1895,8 +1895,8 @@ internal FieldInfo GetField(RuntimeFieldHandleInternal field) else if (!declaredType.IsAssignableFrom(reflectedType)) { // declaredType is not Array, not generic, and not assignable from reflectedType - throw new ArgumentException(string.Format( - CultureInfo.CurrentCulture, SR.Argument_ResolveMethodHandle, + throw new ArgumentException(SR.Format( + SR.Argument_ResolveMethodHandle, reflectedType.ToString(), declaredType.ToString())); } }