240 references to Format
System.Private.CoreLib (240)
src\libraries\System.Private.CoreLib\src\Microsoft\Win32\SafeHandles\SafeFileHandle.Unix.cs (1)
455throw new IOException(SR.Format(errorInfo.Error == Interop.Error.EFBIG
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\Boolean.cs (2)
333throw new InvalidCastException(SR.Format(SR.InvalidCast_FromTo, "Boolean", "Char")); 393throw new InvalidCastException(SR.Format(SR.InvalidCast_FromTo, "Boolean", "DateTime"));
src\libraries\System.Private.CoreLib\src\System\Byte.cs (1)
249throw new InvalidCastException(SR.Format(SR.InvalidCast_FromTo, "Byte", "DateTime"));
src\libraries\System.Private.CoreLib\src\System\Char.cs (5)
552throw new InvalidCastException(SR.Format(SR.InvalidCast_FromTo, "Char", "Boolean")); 602throw new InvalidCastException(SR.Format(SR.InvalidCast_FromTo, "Char", "Single")); 607throw new InvalidCastException(SR.Format(SR.InvalidCast_FromTo, "Char", "Double")); 612throw new InvalidCastException(SR.Format(SR.InvalidCast_FromTo, "Char", "Decimal")); 617throw new InvalidCastException(SR.Format(SR.InvalidCast_FromTo, "Char", "DateTime"));
src\libraries\System.Private.CoreLib\src\System\Collections\Hashtable.cs (1)
891throw new ArgumentException(SR.Format(SR.Argument_AddingDuplicate__, _buckets[bucketNumber].key, key));
src\libraries\System.Private.CoreLib\src\System\Collections\ListDictionaryInternal.cs (1)
107throw new ArgumentException(SR.Format(SR.Argument_AddingDuplicate__, node.key, key));
src\libraries\System.Private.CoreLib\src\System\Convert.cs (1)
219throw new InvalidCastException(SR.Format(SR.InvalidCast_FromTo, value.GetType().FullName, targetType.FullName));
src\libraries\System.Private.CoreLib\src\System\CurrentSystemTimeZone.cs (1)
118throw new ArgumentOutOfRangeException(nameof(year), SR.Format(SR.ArgumentOutOfRange_Range, 1, 9999));
src\libraries\System.Private.CoreLib\src\System\DateOnly.cs (2)
700throw new FormatException(SR.Format(SR.Format_DateTimeOnlyContainsNoneDateParts, s.ToString(), nameof(DateOnly))); 822throw new FormatException(SR.Format(SR.Format_DateTimeOnlyContainsNoneDateParts, format.ToString(), nameof(DateOnly)));
src\libraries\System.Private.CoreLib\src\System\DateTime.cs (3)
207internal static void ThrowMillisecondOutOfRange() => throw new ArgumentOutOfRangeException("millisecond", SR.Format(SR.ArgumentOutOfRange_Range, 0, TimeSpan.MillisecondsPerSecond - 1)); 208internal static void ThrowMicrosecondOutOfRange() => throw new ArgumentOutOfRangeException("microsecond", SR.Format(SR.ArgumentOutOfRange_Range, 0, TimeSpan.MicrosecondsPerMillisecond - 1)); 1973private static InvalidCastException InvalidCast(string to) => new InvalidCastException(SR.Format(SR.InvalidCast_FromTo, nameof(DateTime), to));
src\libraries\System.Private.CoreLib\src\System\Decimal.cs (3)
688throw new ArgumentException(SR.Format(SR.Argument_InvalidEnumValue, mode, nameof(MidpointRounding)), nameof(mode)); 1041throw new InvalidCastException(SR.Format(SR.InvalidCast_FromTo, "Decimal", "Char")); 1101throw new InvalidCastException(SR.Format(SR.InvalidCast_FromTo, "Decimal", "DateTime"));
src\libraries\System.Private.CoreLib\src\System\Diagnostics\Contracts\Contracts.cs (1)
638ContractHelper.TriggerFailure(kind, SR.Format(SR.MustUseCCRewrite, contractKind, simpleName), null, null, null);
src\libraries\System.Private.CoreLib\src\System\Diagnostics\Tracing\EventDescriptor.cs (2)
63throw new ArgumentOutOfRangeException(nameof(id), SR.Format(SR.ArgumentOutOfRange_NeedValidId, 1, ushort.MaxValue)); 78throw new ArgumentOutOfRangeException(nameof(task), SR.Format(SR.ArgumentOutOfRange_NeedValidId, 1, ushort.MaxValue));
src\libraries\System.Private.CoreLib\src\System\Diagnostics\Tracing\EventSource.cs (19)
555return SR.Format(SR.EventSource_ToString, Name, Guid); 2126ReportOutOfBandMessage(SR.Format(SR.EventSource_VarArgsParameterMismatch, eventId, infos[i].Name)); 3259manifest.ManifestError(SR.Format(SR.EventSource_AbstractMustNotDeclareEventMethods, method.Name, eventAttribute.EventId)); 3293manifest.ManifestError(SR.Format(SR.EventSource_EventMustNotBeExplicitImplementation, method.Name, eventAttribute.EventId)); 3499manifest.ManifestError(SR.Format(SR.EventSource_EnumKindMismatch, staticField.FieldType.Name, providerEnumKind)); 3603manifest.ManifestError(SR.Format(SR.EventSource_EventIdReused, evtName, evtId), true); 3642manifest.ManifestError(SR.Format(SR.EventSource_EventMustHaveTaskIfNonDefaultOpcode, evtName, evtId)); 5341ManifestError(SR.Format(SR.EventSource_IllegalOpcodeValue, name, value)); 5359ManifestError(SR.Format(SR.EventSource_IllegalTaskValue, name, value)); 5376ManifestError(SR.Format(SR.EventSource_KeywordNeedPowerOfTwo, $"0x{value:x}", name), true); 5382ManifestError(SR.Format(SR.EventSource_IllegalKeywordsValue, name, $"0x{value:x}")); 5402ManifestError(SR.Format(SR.EventSource_EventChannelOutOfRange, name, value)); 5408ManifestError(SR.Format(SR.EventSource_ChannelTypeDoesNotMatchEventChannelValue, 5905ManifestError(SR.Format(SR.EventSource_UndefinedChannel, channel, eventName)); 5917ManifestError(SR.Format(SR.EventSource_UndefinedChannel, channel, eventName)); 5925ManifestError(SR.Format(SR.EventSource_EventWithAdminChannelMustHaveMessage, eventName, info.Name)); 5969ManifestError(SR.Format(SR.EventSource_UndefinedOpcode, opcode, eventName), true); 5997ManifestError(SR.Format(SR.EventSource_UndefinedKeyword, "0x" + bit.ToString("x", CultureInfo.CurrentCulture), eventName), true); 6141ManifestError(SR.Format(SR.EventSource_UnsupportedMessageProperty, evtName, eventMessage));
src\libraries\System.Private.CoreLib\src\System\Double.cs (2)
459throw new InvalidCastException(SR.Format(SR.InvalidCast_FromTo, "Double", "Char")); 519throw new InvalidCastException(SR.Format(SR.InvalidCast_FromTo, "Double", "DateTime"));
src\libraries\System.Private.CoreLib\src\System\Enum.cs (5)
404throw new ArgumentException(SR.Format(SR.Argument_EnumTypeDoesNotMatch, flag.GetType(), GetType())); 1289throw new ArgumentException(SR.Format(SR.Arg_EnumAndObjectMustBeSameType, target.GetType(), GetType())); 1636throw new ArgumentException(SR.Format(SR.Arg_EnumAndObjectMustBeSameType, valueType, rtType)); 1649throw new ArgumentException(SR.Format(SR.Arg_EnumFormatUnderlyingTypeAndObjectMustBeSameType, valueType, underlyingType)); 2190DateTime IConvertible.ToDateTime(IFormatProvider? provider) => throw new InvalidCastException(SR.Format(SR.InvalidCast_FromTo, "Enum", "DateTime"));
src\libraries\System.Private.CoreLib\src\System\Globalization\Calendar.cs (4)
114throw new ArgumentException(SR.Format(SR.Argument_ResultCalendarRange, minValue, maxValue)); 481SR.Format(SR.ArgumentOutOfRange_Range, DayOfWeek.Sunday, DayOfWeek.Saturday)); 492SR.Format(SR.ArgumentOutOfRange_Range, CalendarWeekRule.FirstDay, CalendarWeekRule.FirstFourDayWeek)), 678SR.Format(SR.ArgumentOutOfRange_Range, 0, TimeSpan.MillisecondsPerSecond - 1));
src\libraries\System.Private.CoreLib\src\System\Globalization\ChineseLunisolarCalendar.cs (2)
258throw new ArgumentOutOfRangeException("year", lunarYear, SR.Format(SR.ArgumentOutOfRange_Range, MinLunisolarYear, MaxLunisolarYear)); 277throw new ArgumentOutOfRangeException(nameof(year), year, SR.Format(SR.ArgumentOutOfRange_Range, MinLunisolarYear, MaxLunisolarYear));
src\libraries\System.Private.CoreLib\src\System\Globalization\CultureData.cs (1)
522SR.Format(SR.ArgumentOutOfRange_Range, CultureTypes.NeutralCultures, CultureTypes.FrameworkCultures));
src\libraries\System.Private.CoreLib\src\System\Globalization\CultureInfo.cs (1)
1093throw new CultureNotFoundException("name/altName", SR.Format(SR.Argument_OneOfCulturesNotSupported, name, altName));
src\libraries\System.Private.CoreLib\src\System\Globalization\DateTimeFormatInfo.cs (2)
649SR.Format(SR.ArgumentOutOfRange_Range, DayOfWeek.Sunday, DayOfWeek.Saturday)); 679SR.Format(SR.ArgumentOutOfRange_Range, CalendarWeekRule.FirstDay, CalendarWeekRule.FirstFourDayWeek));
src\libraries\System.Private.CoreLib\src\System\Globalization\DateTimeParse.cs (2)
5208return new FormatException(SR.Format(SR.Format_BadDateTimeCalendar, new string(result.failureSpanArgument), result.calendar)); 5226return new FormatException(SR.Format(SR.Format_UnknownDateTimeWord, new string(result.failureSpanArgument), result.failureIntArgument));
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\GregorianCalendarHelper.cs (5)
136SR.Format( 212SR.Format( 408SR.Format( 448SR.Format( 496SR.Format(SR.ArgumentOutOfRange_Range, m_minYear, m_maxYear));
src\libraries\System.Private.CoreLib\src\System\Globalization\HebrewCalendar.cs (4)
299SR.Format(SR.ArgumentOutOfRange_Range, MinHebrewYear, MaxHebrewYear)); 317SR.Format(SR.ArgumentOutOfRange_Range, 1, monthsInYear)); 335SR.Format(SR.ArgumentOutOfRange_Range, 1, daysInMonth)); 884SR.Format(SR.ArgumentOutOfRange_Range, MinHebrewYear, MaxHebrewYear));
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\JapaneseCalendar.cs (1)
276SR.Format(SR.ArgumentOutOfRange_Range, 99, _helper.MaxYear));
src\libraries\System.Private.CoreLib\src\System\Globalization\JapaneseLunisolarCalendar.cs (1)
148SR.Format(SR.ArgumentOutOfRange_Range, MinLunisolarYear, MaxLunisolarYear));
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, TimeSpan.MillisecondsPerSecond - 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\KoreanCalendar.cs (1)
169SR.Format(SR.ArgumentOutOfRange_Range, 99, _helper.MaxYear));
src\libraries\System.Private.CoreLib\src\System\Globalization\KoreanLunisolarCalendar.cs (2)
1190SR.Format(SR.ArgumentOutOfRange_Range, MinLunisolarYear, MaxLunisolarYear)); 1212SR.Format(SR.ArgumentOutOfRange_Range, MinLunisolarYear, MaxLunisolarYear));
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\TaiwanCalendar.cs (1)
168SR.Format(SR.ArgumentOutOfRange_Range, 99, _helper.MaxYear));
src\libraries\System.Private.CoreLib\src\System\Globalization\TaiwanLunisolarCalendar.cs (1)
204SR.Format(SR.ArgumentOutOfRange_Range, MinLunisolarYear, MaxLunisolarYear));
src\libraries\System.Private.CoreLib\src\System\Globalization\ThaiBuddhistCalendar.cs (1)
150SR.Format(SR.ArgumentOutOfRange_Range, 99, _helper.MaxYear));
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\Int16.cs (1)
252throw new InvalidCastException(SR.Format(SR.InvalidCast_FromTo, "Int16", "DateTime"));
src\libraries\System.Private.CoreLib\src\System\Int32.cs (1)
267throw new InvalidCastException(SR.Format(SR.InvalidCast_FromTo, "Int32", "DateTime"));
src\libraries\System.Private.CoreLib\src\System\Int64.cs (1)
264throw new InvalidCastException(SR.Format(SR.InvalidCast_FromTo, "Int64", "DateTime"));
src\libraries\System.Private.CoreLib\src\System\IO\DirectoryInfo.cs (1)
98throw new ArgumentException(SR.Format(SR.Argument_InvalidSubPath, path, FullPath), nameof(path));
src\libraries\System.Private.CoreLib\src\System\IO\FileStream.cs (1)
194throw new ArgumentException(SR.Format(SR.Argument_InvalidFileModeAndAccessCombo, options.Mode, options.Access), nameof(options));
src\libraries\System.Private.CoreLib\src\System\IO\FileSystem.Unix.cs (1)
146throw new IOException(SR.Format(SR.IO_CannotReplaceSameFile, sourceFullPath, destFullPath));
src\libraries\System.Private.CoreLib\src\System\IO\Strategies\FileStreamHelpers.cs (1)
105throw new ArgumentException(SR.Format(SR.Argument_InvalidFileModeAndAccessCombo, mode, access), nameof(access));
src\libraries\System.Private.CoreLib\src\System\Math.cs (1)
1499throw new ArgumentException(SR.Format(SR.Argument_MinMaxValue, min, max));
src\libraries\System.Private.CoreLib\src\System\MissingFieldException.cs (1)
57return SR.Format(SR.MissingField_Name, ClassName, MemberName);
src\libraries\System.Private.CoreLib\src\System\MissingMemberException.cs (1)
70return SR.Format(SR.MissingMember_Name, ClassName, MemberName);
src\libraries\System.Private.CoreLib\src\System\MissingMethodException.cs (1)
52SR.Format(SR.MissingMethod_Name, ClassName, MemberName);
src\libraries\System.Private.CoreLib\src\System\Random.cs (1)
439throw new ArgumentOutOfRangeException("minValue", SR.Format(SR.Argument_MinMaxValue, "minValue", "maxValue"));
src\libraries\System.Private.CoreLib\src\System\Reflection\Emit\TypeBuilder.cs (2)
128throw new ArgumentException(SR.Format(SR.Argument_MismatchedArrays, nameof(parameterTypeOptionalCustomModifiers), nameof(parameterTypes))); 131throw new ArgumentException(SR.Format(SR.Argument_MismatchedArrays, nameof(parameterTypeRequiredCustomModifiers), nameof(parameterTypes)));
src\libraries\System.Private.CoreLib\src\System\Reflection\FieldAccessor.cs (1)
489throw new FieldAccessException(SR.Format(SR.RFLCT_CannotSetInitonlyStaticField, fieldInfo.Name, fieldInfo.DeclaringType));
src\libraries\System.Private.CoreLib\src\System\Reflection\MethodInvokerCommon.cs (1)
99throw new TargetException(SR.Format(SR.RFLCT_Targ_ITargMismatch_WithType, method.DeclaringType, target.GetType()));
src\libraries\System.Private.CoreLib\src\System\Resources\ManifestBasedResourceGroveler.cs (3)
158throw new ArgumentException(SR.Format(SR.Arg_InvalidNeutralResourcesLanguage_Asm_Culture, a, attr.CultureName), e); 342throw new MissingManifestResourceException(SR.Format(SR.MissingManifestResource_MultipleBlobs, name, satellite.ToString())); 433throw new MissingSatelliteAssemblyException(SR.Format(SR.MissingSatelliteAssembly_Culture_Name, _mediator.NeutralResourcesCulture, satAssemName), missingCultureName);
src\libraries\System.Private.CoreLib\src\System\Resources\ResourceManager.cs (1)
540throw new ArgumentException(SR.Format(SR.Arg_InvalidSatelliteContract_Asm_Ver, a, v));
src\libraries\System.Private.CoreLib\src\System\Resources\ResourceReader.Core.cs (1)
73throw new BadImageFormatException(SR.Format(SR.BadImageFormat_ResType_SerBlobMismatch, type.FullName, graph.GetType().FullName));
src\libraries\System.Private.CoreLib\src\System\Resources\ResourceReader.cs (1)
846throw new ArgumentException(SR.Format(SR.Arg_ResourceFileUnsupportedVersion, CurrentVersion, version));
src\libraries\System.Private.CoreLib\src\System\Runtime\InteropServices\Marshalling\ComVariant.cs (2)
418_ => throw new ArgumentException(SR.Format(SR.ComVariant_SizeMustMatchVariantSize, nameof(T), nameof(vt))) 433throw new InvalidOperationException(SR.Format(SR.ComVariant_TypeIsNotSupportedType, VarType, string.Join(", ", requiredType)));
src\libraries\System.Private.CoreLib\src\System\Runtime\Versioning\VersioningHelper.cs (1)
37throw new ArgumentException(SR.Format(SR.Argument_ResourceScopeWrongDirection, fromResType, toResType), nameof(from));
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)); 755SR.Format(SR.Argument_NotEnoughGenArguments, genericArguments.Length, genericParameters.Length)); 822throw new ArgumentException(SR.Format(SR.Arg_ObjObjEx, value?.GetType(), this)); 893throw new ArgumentException(SR.Format(SR.Arg_ObjObjEx, value?.GetType(), this));
src\libraries\System.Private.CoreLib\src\System\SByte.cs (1)
255throw new InvalidCastException(SR.Format(SR.InvalidCast_FromTo, "SByte", "DateTime"));
src\libraries\System.Private.CoreLib\src\System\Single.cs (2)
454throw new InvalidCastException(SR.Format(SR.InvalidCast_FromTo, "Single", "Char")); 514throw new InvalidCastException(SR.Format(SR.InvalidCast_FromTo, "Single", "DateTime"));
src\libraries\System.Private.CoreLib\src\System\StartupHookProvider.cs (1)
201throw new ArgumentException(SR.Format(SR.Argument_InvalidStartupHookSignature,
src\libraries\System.Private.CoreLib\src\System\Text\DecoderExceptionFallback.cs (1)
66SR.Format(SR.Argument_InvalidCodePageBytesIndex,
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\EncoderLatin1BestFitFallback.cs (2)
57SR.Format(SR.ArgumentOutOfRange_Range, 62SR.Format(SR.ArgumentOutOfRange_Range,
src\libraries\System.Private.CoreLib\src\System\Text\EncoderNLS.cs (1)
242throw new ArgumentException(SR.Format(SR.Argument_EncoderFallbackNotEmpty, Encoding.EncodingName, _fallbackBuffer.GetType()));
src\libraries\System.Private.CoreLib\src\System\Text\EncoderReplacementFallback.cs (2)
122SR.Format(SR.ArgumentOutOfRange_Range, 0xD800, 0xDBFF)); 126SR.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\Text\UnicodeEncoding.cs (2)
382throw new ArgumentException(SR.Format(SR.Argument_EncoderFallbackNotEmpty, this.EncodingName, encoder.Fallback?.GetType())); 665throw new ArgumentException(SR.Format(SR.Argument_EncoderFallbackNotEmpty, this.EncodingName, encoder.Fallback?.GetType()));
src\libraries\System.Private.CoreLib\src\System\Text\UTF32Encoding.cs (2)
375throw new ArgumentException(SR.Format(SR.Argument_EncoderFallbackNotEmpty, this.EncodingName, encoder.Fallback?.GetType().ToString() ?? string.Empty)); 510throw new ArgumentException(SR.Format(SR.Argument_EncoderFallbackNotEmpty, this.EncodingName, encoder.Fallback?.GetType()));
src\libraries\System.Private.CoreLib\src\System\ThrowHelper.cs (6)
113throw new ArgumentException(SR.Format(SR.Argument_InvalidEnumValue, value, typeof(TEnum).Name), argumentName); 254throw new ArgumentOutOfRangeException(parameterName, value, SR.Format(SR.ArgumentOutOfRange_Range, minInclusive, maxInclusive)); 674throw new FormatException(SR.Format(SR.Format_InvalidStringWithOffsetAndReason, offset, GetResourceString(resource))); 692return new AmbiguousMatchException(SR.Format(SR.Arg_AmbiguousMatchException_MemberInfo, declaringType, memberInfo)); 730return new ArgumentException(SR.Format(SR.Arg_WrongType, key, targetType), nameof(key)); 735return new ArgumentException(SR.Format(SR.Arg_WrongType, value, targetType), nameof(value));
src\libraries\System.Private.CoreLib\src\System\TimeOnly.cs (2)
870throw new FormatException(SR.Format(SR.Format_DateTimeOnlyContainsNoneDateParts, s.ToString(), nameof(TimeOnly))); 992throw new FormatException(SR.Format(SR.Format_DateTimeOnlyContainsNoneDateParts, format.ToString(), nameof(TimeOnly)));
src\libraries\System.Private.CoreLib\src\System\TimeZoneInfo.Unix.NonAndroid.cs (2)
132e = new InvalidTimeZoneException(SR.Format(SR.InvalidTimeZone_InvalidFileData, id, timeZoneFilePath), ex); 140e = new InvalidTimeZoneException(SR.Format(SR.InvalidTimeZone_InvalidFileData, id, timeZoneFilePath));
src\libraries\System.Private.CoreLib\src\System\Type.Enum.cs (2)
34throw new ArgumentException(SR.Format(SR.Arg_EnumAndObjectMustBeSameType, valueType, this)); 55throw new ArgumentException(SR.Format(SR.Arg_EnumUnderlyingTypeAndObjectMustBeSameType, valueType, underlyingType));
src\libraries\System.Private.CoreLib\src\System\UInt16.cs (1)
246throw new InvalidCastException(SR.Format(SR.InvalidCast_FromTo, "UInt16", "DateTime"));
src\libraries\System.Private.CoreLib\src\System\UInt32.cs (1)
262throw new InvalidCastException(SR.Format(SR.InvalidCast_FromTo, "UInt32", "DateTime"));
src\libraries\System.Private.CoreLib\src\System\UInt64.cs (1)
261throw new InvalidCastException(SR.Format(SR.InvalidCast_FromTo, "UInt64", "DateTime"));
src\libraries\System.Private.CoreLib\src\System\Version.cs (1)
222throw new ArgumentException(SR.Format(SR.ArgumentOutOfRange_Bounds_Lower_Upper, "0", failureUpperBound), nameof(fieldCount));
src\System\GC.CoreCLR.cs (3)
77SR.Format( 451SR.Format( 460SR.Format(
src\System\Reflection\Emit\DynamicILGenerator.cs (3)
476throw new ArgumentException(SR.Format(SR.Argument_MismatchedArrays, nameof(requiredCustomModifiers), nameof(parameterTypes))); 479throw new ArgumentException(SR.Format(SR.Argument_MismatchedArrays, nameof(optionalCustomModifiers), nameof(parameterTypes))); 1024throw new ArgumentException(SR.Format(SR.Argument_MethodDeclaringTypeGenericLcg, m, t));
src\System\Reflection\Emit\RuntimeILGenerator.cs (1)
217throw new NotSupportedException(SR.Format(SR.NotSupported_IllegalOneByteBranch, fixupData.m_fixupPos, updateAddr));
src\System\Reflection\Emit\SignatureHelper.cs (2)
806throw new ArgumentException(SR.Format(SR.Argument_MismatchedArrays, nameof(requiredCustomModifiers), nameof(arguments))); 809throw new ArgumentException(SR.Format(SR.Argument_MismatchedArrays, nameof(optionalCustomModifiers), nameof(arguments)));
src\System\Reflection\FieldInfo.CoreCLR.cs (1)
17throw new ArgumentException(SR.Format(
src\System\Reflection\MethodBase.CoreCLR.cs (1)
24throw new ArgumentException(SR.Format(
src\System\Reflection\RuntimeModule.cs (15)
53SR.Format(SR.Argument_InvalidToken, tk, this)); 56throw new ArgumentException(SR.Format(SR.Argument_InvalidToken, tk, this), 82throw new ArgumentException(SR.Format(SR.Argument_ResolveMethod, tk, this), 90throw new ArgumentException(SR.Format(SR.Argument_ResolveMethod, tk, this), 136SR.Format(SR.Argument_InvalidToken, tk, this)); 153throw new ArgumentException(SR.Format(SR.Argument_ResolveField, tk, this), nameof(metadataToken)); 166SR.Format(SR.Argument_InvalidToken, tk, this)); 183throw new ArgumentException(SR.Format(SR.Argument_ResolveField, tk, this), 191throw new ArgumentException(SR.Format(SR.Argument_ResolveField, tk, this), 229throw new ArgumentException(SR.Format(SR.Argument_ResolveType, tk, this), nameof(metadataToken)); 274SR.Format(SR.Argument_InvalidToken, tk, this)); 291throw new ArgumentException(SR.Format(SR.Argument_ResolveMember, tk, this), 301SR.Format(SR.Argument_ResolveString, metadataToken, this)); 305SR.Format(SR.Argument_InvalidToken, tk, this)); 308throw new ArgumentException(SR.Format(SR.Argument_ResolveString, metadataToken, this));
src\System\Reflection\TypeNameResolver.CoreCLR.cs (4)
229SR.Format(SR.TypeLoad_ResolveTypeFromAssembly, escapedTypeName, assembly.FullName), 298throw new TypeLoadException(SR.Format(SR.TypeLoad_ResolveTypeFromAssembly, parsedName.FullName, runtimeAssembly.FullName), 333throw new TypeLoadException(SR.Format(SR.TypeLoad_ResolveNestedType, 372throw new TypeLoadException(SR.Format(SR.TypeLoad_ResolveTypeFromAssembly, parsedName.FullName, (requestingAssembly ?? coreLib).FullName),
src\System\Runtime\InteropServices\DynamicInterfaceCastableHelpers.cs (4)
20throw new InvalidCastException(SR.Format(SR.InvalidCast_FromTo, castable.GetType(), interfaceType)); 30throw new InvalidCastException(SR.Format(SR.InvalidCast_FromTo, castable.GetType(), interfaceType)); 37throw new InvalidOperationException(SR.Format(SR.IDynamicInterfaceCastable_MissingImplementationAttribute, implType, nameof(DynamicInterfaceCastableImplementationAttribute))); 40throw new InvalidOperationException(SR.Format(SR.IDynamicInterfaceCastable_DoesNotImplementRequested, implType, interfaceType));
src\System\RuntimeHandles.cs (3)
1855SR.Format(SR.Argument_InvalidToken, typeToken, new ModuleHandle(module))); 1908SR.Format(SR.Argument_InvalidToken, methodToken, new ModuleHandle(module))); 1961SR.Format(SR.Argument_InvalidToken, fieldToken, new ModuleHandle(module)));
src\System\RuntimeType.ActivatorCache.cs (1)
62string friendlyMessage = SR.Format(SR.Activator_CannotCreateInstance, rt, ex.Message);
src\System\RuntimeType.CoreCLR.cs (4)
1837throw new ArgumentException(SR.Format( 1865throw new ArgumentException(SR.Format( 1887throw new ArgumentException(SR.Format( 1962throw new ArgumentException(SR.Format(