src\libraries\System.Private.CoreLib\src\System\ArgumentOutOfRangeException.cs (3)
92throw new ArgumentOutOfRangeException(paramName, value, SR.Format(SR.ArgumentOutOfRange_Generic_MustBeNonZero, paramName, value));
96throw new ArgumentOutOfRangeException(paramName, value, SR.Format(SR.ArgumentOutOfRange_Generic_MustBeNonNegative, paramName, value));
100throw new ArgumentOutOfRangeException(paramName, value, SR.Format(SR.ArgumentOutOfRange_Generic_MustBeNonNegativeNonZero, paramName, value));
src\libraries\System.Private.CoreLib\src\System\Char.cs (5)
519throw new InvalidCastException(SR.Format(SR.InvalidCast_FromTo, "Char", "Boolean"));
569throw new InvalidCastException(SR.Format(SR.InvalidCast_FromTo, "Char", "Single"));
574throw new InvalidCastException(SR.Format(SR.InvalidCast_FromTo, "Char", "Double"));
579throw new InvalidCastException(SR.Format(SR.InvalidCast_FromTo, "Char", "Decimal"));
584throw new InvalidCastException(SR.Format(SR.InvalidCast_FromTo, "Char", "DateTime"));
src\libraries\System.Private.CoreLib\src\System\Diagnostics\Tracing\EventSource.cs (19)
488return SR.Format(SR.EventSource_ToString, Name, Guid);
2052ReportOutOfBandMessage(SR.Format(SR.EventSource_VarArgsParameterMismatch, eventId, infos[i].Name));
3182manifest.ManifestError(SR.Format(SR.EventSource_AbstractMustNotDeclareEventMethods, method.Name, eventAttribute.EventId));
3216manifest.ManifestError(SR.Format(SR.EventSource_EventMustNotBeExplicitImplementation, method.Name, eventAttribute.EventId));
3421manifest.ManifestError(SR.Format(SR.EventSource_EnumKindMismatch, staticField.FieldType.Name, providerEnumKind));
3546manifest.ManifestError(SR.Format(SR.EventSource_EventIdReused, evtName, evtId), true);
3585manifest.ManifestError(SR.Format(SR.EventSource_EventMustHaveTaskIfNonDefaultOpcode, evtName, evtId));
5191ManifestError(SR.Format(SR.EventSource_IllegalOpcodeValue, name, value));
5209ManifestError(SR.Format(SR.EventSource_IllegalTaskValue, name, value));
5226ManifestError(SR.Format(SR.EventSource_KeywordNeedPowerOfTwo, $"0x{value:x}", name), true);
5232ManifestError(SR.Format(SR.EventSource_IllegalKeywordsValue, name, $"0x{value:x}"));
5252ManifestError(SR.Format(SR.EventSource_EventChannelOutOfRange, name, value));
5258ManifestError(SR.Format(SR.EventSource_ChannelTypeDoesNotMatchEventChannelValue,
5755ManifestError(SR.Format(SR.EventSource_UndefinedChannel, channel, eventName));
5767ManifestError(SR.Format(SR.EventSource_UndefinedChannel, channel, eventName));
5775ManifestError(SR.Format(SR.EventSource_EventWithAdminChannelMustHaveMessage, eventName, info.Name));
5819ManifestError(SR.Format(SR.EventSource_UndefinedOpcode, opcode, eventName), true);
5847ManifestError(SR.Format(SR.EventSource_UndefinedKeyword, "0x" + bit.ToString("x", CultureInfo.CurrentCulture), eventName), true);
5991ManifestError(SR.Format(SR.EventSource_UnsupportedMessageProperty, evtName, eventMessage));
src\libraries\System.Private.CoreLib\src\System\Enum.cs (5)
406throw new ArgumentException(SR.Format(SR.Argument_EnumTypeDoesNotMatch, flag.GetType(), GetType()));
1291throw new ArgumentException(SR.Format(SR.Arg_EnumAndObjectMustBeSameType, target.GetType(), GetType()));
1638throw new ArgumentException(SR.Format(SR.Arg_EnumAndObjectMustBeSameType, valueType, rtType));
1651throw new ArgumentException(SR.Format(SR.Arg_EnumFormatUnderlyingTypeAndObjectMustBeSameType, valueType, underlyingType));
2192DateTime IConvertible.ToDateTime(IFormatProvider? provider) => throw new InvalidCastException(SR.Format(SR.InvalidCast_FromTo, "Enum", "DateTime"));
src\libraries\System.Private.CoreLib\src\System\Globalization\EastAsianLunisolarCalendar.cs (7)
41SR.Format(SR.ArgumentOutOfRange_Range, 1, 60));
58SR.Format(SR.ArgumentOutOfRange_Range, 1, 60));
176SR.Format(SR.ArgumentOutOfRange_Range, MinEraCalendarYear(era), MaxEraCalendarYear(era)));
253SR.Format(SR.ArgumentOutOfRange_Day, daysInMonth, month));
431SR.Format(SR.ArgumentOutOfRange_Range, -120000, 120000));
604SR.Format(SR.ArgumentOutOfRange_Day, daysInMonth, month));
669SR.Format(SR.ArgumentOutOfRange_Range, 99, MaxCalendarYear));
src\libraries\System.Private.CoreLib\src\System\Globalization\GregorianCalendar.cs (11)
54SR.Format(SR.ArgumentOutOfRange_Range, GregorianCalendarTypes.Localized, GregorianCalendarTypes.TransliteratedFrench));
71SR.Format(SR.ArgumentOutOfRange_Range, GregorianCalendarTypes.Localized, GregorianCalendarTypes.TransliteratedFrench));
144SR.Format(SR.ArgumentOutOfRange_Range, -120000, 120000));
257SR.Format(SR.ArgumentOutOfRange_Range, 1, MaxYear));
296SR.Format(SR.ArgumentOutOfRange_Range, 1, 12));
308SR.Format(SR.ArgumentOutOfRange_Range, 1, MaxYear));
315SR.Format(SR.ArgumentOutOfRange_Range, 1, GetDaysInMonth(year, month)));
337SR.Format(SR.ArgumentOutOfRange_Range, 1, MaxYear));
358SR.Format(SR.ArgumentOutOfRange_Range, 1, MaxYear));
365SR.Format(SR.ArgumentOutOfRange_Range, 1, 12));
430SR.Format(SR.ArgumentOutOfRange_Range, 99, MaxYear));
src\libraries\System.Private.CoreLib\src\System\Globalization\HijriCalendar.cs (8)
127SR.Format(SR.ArgumentOutOfRange_Bounds_Lower_Upper, MinAdvancedHijri, MaxAdvancedHijri));
165SR.Format(SR.ArgumentOutOfRange_Range, 1, MaxCalendarYear));
179SR.Format(SR.ArgumentOutOfRange_Range, 1, MaxCalendarMonth));
274SR.Format(SR.ArgumentOutOfRange_Range, -120000, 120000));
374SR.Format(SR.ArgumentOutOfRange_Day, daysInMonth, month));
407SR.Format(SR.ArgumentOutOfRange_Day, daysInMonth, month));
440SR.Format(SR.ArgumentOutOfRange_Range, 99, MaxCalendarYear));
461SR.Format(SR.ArgumentOutOfRange_Range, 1, MaxCalendarYear));
src\libraries\System.Private.CoreLib\src\System\Globalization\JulianCalendar.cs (6)
68SR.Format(SR.ArgumentOutOfRange_Range, 1, MaxYear));
106SR.Format(SR.ArgumentOutOfRange_Range, 1, monthDays));
187SR.Format(SR.ArgumentOutOfRange_Range, -120000, 120000));
311SR.Format(SR.ArgumentOutOfRange_Range, 0, MillisPerSecond - 1));
333SR.Format(SR.ArgumentOutOfRange_Range, 99, MaxYear));
348SR.Format(SR.ArgumentOutOfRange_Bounds_Lower_Upper, 1, MaxYear));
src\libraries\System.Private.CoreLib\src\System\Globalization\PersianCalendar.cs (8)
80SR.Format(SR.ArgumentOutOfRange_CalendarRange, s_minDate, s_maxDate));
100SR.Format(SR.ArgumentOutOfRange_Range, 1, MaxCalendarYear));
114SR.Format(SR.ArgumentOutOfRange_Range, 1, MaxCalendarMonth));
226SR.Format(SR.ArgumentOutOfRange_Range, -120000, 120000));
338SR.Format(SR.ArgumentOutOfRange_Day, daysInMonth, month));
377SR.Format(SR.ArgumentOutOfRange_Day, daysInMonth, month));
411SR.Format(SR.ArgumentOutOfRange_Range, 99, MaxCalendarYear));
431SR.Format(SR.ArgumentOutOfRange_Range, 1, MaxCalendarYear));
src\libraries\System.Private.CoreLib\src\System\Globalization\UmAlQuraCalendar.cs (6)
324SR.Format(SR.ArgumentOutOfRange_Range, MinCalendarYear, MaxCalendarYear));
417SR.Format(SR.ArgumentOutOfRange_Range, -120000, 120000));
546SR.Format(SR.ArgumentOutOfRange_Day, daysInMonth, month));
585SR.Format(SR.ArgumentOutOfRange_Day, daysInMonth, month));
617SR.Format(SR.ArgumentOutOfRange_Range, MinCalendarYear, MaxCalendarYear));
640SR.Format(SR.ArgumentOutOfRange_Range, MinCalendarYear, MaxCalendarYear));
src\libraries\System.Private.CoreLib\src\System\RuntimeType.cs (5)
214throw new ArgumentException(SR.Format(SR.Arg_EnumAndObjectMustBeSameType, valueType, this));
229throw new ArgumentException(SR.Format(SR.Arg_EnumUnderlyingTypeAndObjectMustBeSameType, valueType, underlyingType));
737SR.Format(SR.Argument_NotEnoughGenArguments, genericArguments.Length, genericParameters.Length));
804throw new ArgumentException(SR.Format(SR.Arg_ObjObjEx, value?.GetType(), this));
875throw new ArgumentException(SR.Format(SR.Arg_ObjObjEx, value?.GetType(), this));
src\libraries\System.Private.CoreLib\src\System\Text\EncoderExceptionFallback.cs (6)
39SR.Format(SR.Argument_InvalidCodePageConversionIndex, (int)charUnknown, index), charUnknown, index);
47SR.Format(SR.ArgumentOutOfRange_Range, 0xD800, 0xDBFF));
52SR.Format(SR.ArgumentOutOfRange_Range, 0xDC00, 0xDFFF));
59SR.Format(SR.Argument_InvalidCodePageConversionIndex, iTemp, index), charUnknownHigh, charUnknownLow, index);
111SR.Format(SR.ArgumentOutOfRange_Range, 0xD800, 0xDBFF));
116SR.Format(SR.ArgumentOutOfRange_Range, 0xDC00, 0xDFFF));
src\libraries\System.Private.CoreLib\src\System\Text\Encoding.cs (4)
249nameof(codepage), SR.Format(SR.ArgumentOutOfRange_Range, 0, 65535));
1099SR.Format(SR.Argument_EncodingConversionOverflowBytes, _codePage, EncoderFallback.GetType()), "bytes");
1127SR.Format(SR.Argument_EncodingConversionOverflowChars, _codePage, DecoderFallback.GetType()), "chars");
1438throw new ArgumentException(SR.Format(SR.Argument_EncoderFallbackNotEmpty,
src\libraries\System.Private.CoreLib\src\System\ThrowHelper.cs (6)
119throw new ArgumentException(SR.Format(SR.Argument_InvalidEnumValue, value, typeof(TEnum).Name), argumentName);
260throw new ArgumentOutOfRangeException(parameterName, value, SR.Format(SR.ArgumentOutOfRange_Range, minInclusive, maxInclusive));
680throw new FormatException(SR.Format(SR.Format_InvalidStringWithOffsetAndReason, offset, GetResourceString(resource)));
698return new AmbiguousMatchException(SR.Format(SR.Arg_AmbiguousMatchException_MemberInfo, declaringType, memberInfo));
736return new ArgumentException(SR.Format(SR.Arg_WrongType, key, targetType), nameof(key));
741return new ArgumentException(SR.Format(SR.Arg_WrongType, value, targetType), nameof(value));
src\System\Reflection\RuntimeModule.cs (15)
56SR.Format(SR.Argument_InvalidToken, tk, this));
59throw new ArgumentException(SR.Format(SR.Argument_InvalidToken, tk, this),
85throw new ArgumentException(SR.Format(SR.Argument_ResolveMethod, tk, this),
93throw new ArgumentException(SR.Format(SR.Argument_ResolveMethod, tk, this),
139SR.Format(SR.Argument_InvalidToken, tk, this));
156throw new ArgumentException(SR.Format(SR.Argument_ResolveField, tk, this), nameof(metadataToken));
169SR.Format(SR.Argument_InvalidToken, tk, this));
186throw new ArgumentException(SR.Format(SR.Argument_ResolveField, tk, this),
194throw new ArgumentException(SR.Format(SR.Argument_ResolveField, tk, this),
232throw new ArgumentException(SR.Format(SR.Argument_ResolveType, tk, this), nameof(metadataToken));
277SR.Format(SR.Argument_InvalidToken, tk, this));
294throw new ArgumentException(SR.Format(SR.Argument_ResolveMember, tk, this),
304SR.Format(SR.Argument_ResolveString, metadataToken, this));
308SR.Format(SR.Argument_InvalidToken, tk, this));
314SR.Format(SR.Argument_ResolveString, metadataToken, this));