diff options
author | Stephen Toub <stoub@microsoft.com> | 2019-01-02 19:57:17 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-01-02 19:57:17 -0500 |
commit | 369f53ea121798a65b81e6878c739c6bdcaae895 (patch) | |
tree | 2ec5f74fc810b9b9af2592af594ce1992ff9dc91 | |
parent | 922971c5e2a0e74841218dbd8e00f6354ab2b98f (diff) | |
download | coreclr-369f53ea121798a65b81e6878c739c6bdcaae895.tar.gz coreclr-369f53ea121798a65b81e6878c739c6bdcaae895.tar.bz2 coreclr-369f53ea121798a65b81e6878c739c6bdcaae895.zip |
Replace string.Format(SR. with SR.Format(SR. (#21763)
We use SR.Format in almost all places where we format resource strings (without a format provider), but there were a few stragglers.
-rw-r--r-- | src/System.Private.CoreLib/shared/System/Convert.cs | 8 | ||||
-rw-r--r-- | src/System.Private.CoreLib/shared/System/Threading/ManualResetEventSlim.cs | 4 |
2 files changed, 6 insertions, 6 deletions
diff --git a/src/System.Private.CoreLib/shared/System/Convert.cs b/src/System.Private.CoreLib/shared/System/Convert.cs index 1c303d2481..077dda9d4f 100644 --- a/src/System.Private.CoreLib/shared/System/Convert.cs +++ b/src/System.Private.CoreLib/shared/System/Convert.cs @@ -306,7 +306,7 @@ namespace System if (ReferenceEquals(targetType, ConvertTypes[(int)TypeCode.Empty])) throw new InvalidCastException(SR.InvalidCast_Empty); - throw new InvalidCastException(string.Format(SR.InvalidCast_FromTo, value.GetType().FullName, targetType.FullName)); + throw new InvalidCastException(SR.Format(SR.InvalidCast_FromTo, value.GetType().FullName, targetType.FullName)); } public static object ChangeType(object value, Type conversionType) @@ -2412,7 +2412,7 @@ namespace System { if (options < Base64FormattingOptions.None || options > Base64FormattingOptions.InsertLineBreaks) { - throw new ArgumentException(string.Format(SR.Arg_EnumIllegalVal, (int)options), nameof(options)); + throw new ArgumentException(SR.Format(SR.Arg_EnumIllegalVal, (int)options), nameof(options)); } if (bytes.Length == 0) @@ -2457,7 +2457,7 @@ namespace System if (options < Base64FormattingOptions.None || options > Base64FormattingOptions.InsertLineBreaks) { - throw new ArgumentException(string.Format(SR.Arg_EnumIllegalVal, (int)options), nameof(options)); + throw new ArgumentException(SR.Format(SR.Arg_EnumIllegalVal, (int)options), nameof(options)); } @@ -2500,7 +2500,7 @@ namespace System { if (options < Base64FormattingOptions.None || options > Base64FormattingOptions.InsertLineBreaks) { - throw new ArgumentException(string.Format(SR.Arg_EnumIllegalVal, (int)options), nameof(options)); + throw new ArgumentException(SR.Format(SR.Arg_EnumIllegalVal, (int)options), nameof(options)); } if (bytes.Length == 0) diff --git a/src/System.Private.CoreLib/shared/System/Threading/ManualResetEventSlim.cs b/src/System.Private.CoreLib/shared/System/Threading/ManualResetEventSlim.cs index dd3de83058..18eee25587 100644 --- a/src/System.Private.CoreLib/shared/System/Threading/ManualResetEventSlim.cs +++ b/src/System.Private.CoreLib/shared/System/Threading/ManualResetEventSlim.cs @@ -148,7 +148,7 @@ namespace System.Threading // it is possible for the max number of waiters to be exceeded via user-code, hence we use a real exception here. if (value >= NumWaitersState_MaxValue) - throw new InvalidOperationException(string.Format(SR.ManualResetEventSlim_ctor_TooManyWaiters, NumWaitersState_MaxValue)); + throw new InvalidOperationException(SR.Format(SR.ManualResetEventSlim_ctor_TooManyWaiters, NumWaitersState_MaxValue)); UpdateStateAtomically(value << NumWaitersState_ShiftCount, NumWaitersState_BitMask); } @@ -203,7 +203,7 @@ namespace System.Threading { throw new ArgumentOutOfRangeException( nameof(spinCount), - string.Format(SR.ManualResetEventSlim_ctor_SpinCountOutOfRange, SpinCountState_MaxValue)); + SR.Format(SR.ManualResetEventSlim_ctor_SpinCountOutOfRange, SpinCountState_MaxValue)); } // We will suppress default spin because the user specified a count. |