218 references to Format
System.Private.CoreLib (218)
Internal\Reflection\Augments\ReflectionAugments.cs (3)
125throw new ArgumentException(SR.Format(SR.Argument_MethodDeclaringTypeGeneric, methodBase, methodBase.DeclaringType.GetGenericTypeDefinition())); 144throw new ArgumentException(SR.Format(SR.Argument_ResolveMethodHandle, 187throw new ArgumentException(SR.Format(SR.Argument_ResolveFieldHandle,
Internal\Reflection\Core\Execution\MethodBaseInvoker.cs (1)
60throw new TargetException(SR.Format(SR.RFLCT_Targ_ITargMismatch_WithType, declaringTypeHandle.GetRuntimeTypeInfoForRuntimeTypeHandle(), thisObject.GetType()));
Internal\Runtime\CompilerHelpers\InteropHelpers.cs (1)
387throw new EntryPointNotFoundException(SR.Format(SR.Arg_EntryPointNotFoundExceptionParameterized, entryPointName, GetModuleName(pCell->Module)));
Internal\Runtime\TypeLoaderExceptionHelper.cs (1)
29return new TypeLoadException(SR.Format(GetFormatString(id), typeName, moduleName), typeName);
src\runtime\src\libraries\System.Private.CoreLib\src\Microsoft\Win32\SafeHandles\SafeFileHandle.Unix.cs (1)
509throw new IOException(SR.Format(errorInfo.Error == Interop.Error.EFBIG
src\runtime\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\runtime\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\runtime\src\libraries\System.Private.CoreLib\src\System\Byte.cs (1)
243throw new InvalidCastException(SR.Format(SR.InvalidCast_FromTo, "Byte", "DateTime"));
src\runtime\src\libraries\System.Private.CoreLib\src\System\Char.cs (5)
586throw new InvalidCastException(SR.Format(SR.InvalidCast_FromTo, "Char", "Boolean")); 636throw new InvalidCastException(SR.Format(SR.InvalidCast_FromTo, "Char", "Single")); 641throw new InvalidCastException(SR.Format(SR.InvalidCast_FromTo, "Char", "Double")); 646throw new InvalidCastException(SR.Format(SR.InvalidCast_FromTo, "Char", "Decimal")); 651throw new InvalidCastException(SR.Format(SR.InvalidCast_FromTo, "Char", "DateTime"));
src\runtime\src\libraries\System.Private.CoreLib\src\System\Collections\Hashtable.cs (1)
891throw new ArgumentException(SR.Format(SR.Argument_AddingDuplicate__, _buckets[bucketNumber].key, key));
src\runtime\src\libraries\System.Private.CoreLib\src\System\Collections\ListDictionaryInternal.cs (1)
107throw new ArgumentException(SR.Format(SR.Argument_AddingDuplicate__, node.key, key));
src\runtime\src\libraries\System.Private.CoreLib\src\System\Convert.cs (1)
218throw new InvalidCastException(SR.Format(SR.InvalidCast_FromTo, value.GetType().FullName, targetType.FullName));
src\runtime\src\libraries\System.Private.CoreLib\src\System\CurrentSystemTimeZone.cs (1)
118throw new ArgumentOutOfRangeException(nameof(year), SR.Format(SR.ArgumentOutOfRange_Range, 1, 9999));
src\runtime\src\libraries\System.Private.CoreLib\src\System\DateOnly.cs (2)
760throw new FormatException(SR.Format(SR.Format_DateTimeOnlyContainsNoneDateParts, s.ToString(), nameof(DateOnly))); 882throw new FormatException(SR.Format(SR.Format_DateTimeOnlyContainsNoneDateParts, format.ToString(), nameof(DateOnly)));
src\runtime\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)); 1964private static InvalidCastException InvalidCast(string to) => new InvalidCastException(SR.Format(SR.InvalidCast_FromTo, nameof(DateTime), to));
src\runtime\src\libraries\System.Private.CoreLib\src\System\Decimal.cs (3)
683throw new ArgumentException(SR.Format(SR.Argument_InvalidEnumValue, mode, nameof(MidpointRounding)), nameof(mode)); 1036throw new InvalidCastException(SR.Format(SR.InvalidCast_FromTo, "Decimal", "Char")); 1096throw new InvalidCastException(SR.Format(SR.InvalidCast_FromTo, "Decimal", "DateTime"));
src\runtime\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\runtime\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\runtime\src\libraries\System.Private.CoreLib\src\System\Diagnostics\Tracing\EventSource.cs (7)
544return SR.Format(SR.EventSource_ToString, Name, Guid); 2142ReportOutOfBandMessage(SR.Format(SR.EventSource_VarArgsParameterMismatch, eventId, infos[i].Name)); 3157manifest.ManifestError(SR.Format(SR.EventSource_AbstractMustNotDeclareEventMethods, method.Name, eventAttribute.EventId)); 3191manifest.ManifestError(SR.Format(SR.EventSource_EventMustNotBeExplicitImplementation, method.Name, eventAttribute.EventId)); 3512manifest.ManifestError(SR.Format(SR.EventSource_EnumKindMismatch, staticField.FieldType.Name, providerEnumKind)); 3616manifest.ManifestError(SR.Format(SR.EventSource_EventIdReused, evtName, evtId), true); 3655manifest.ManifestError(SR.Format(SR.EventSource_EventMustHaveTaskIfNonDefaultOpcode, evtName, evtId));
src\runtime\src\libraries\System.Private.CoreLib\src\System\Diagnostics\Tracing\ManifestBuilder.cs (12)
72ManifestError(SR.Format(SR.EventSource_IllegalOpcodeValue, name, value)); 90ManifestError(SR.Format(SR.EventSource_IllegalTaskValue, name, value)); 107ManifestError(SR.Format(SR.EventSource_KeywordNeedPowerOfTwo, $"0x{value:x}", name), true); 113ManifestError(SR.Format(SR.EventSource_IllegalKeywordsValue, name, $"0x{value:x}")); 133ManifestError(SR.Format(SR.EventSource_EventChannelOutOfRange, name, value)); 139ManifestError(SR.Format(SR.EventSource_ChannelTypeDoesNotMatchEventChannelValue, 636ManifestError(SR.Format(SR.EventSource_UndefinedChannel, channel, eventName)); 648ManifestError(SR.Format(SR.EventSource_UndefinedChannel, channel, eventName)); 656ManifestError(SR.Format(SR.EventSource_EventWithAdminChannelMustHaveMessage, eventName, info.Name)); 700ManifestError(SR.Format(SR.EventSource_UndefinedOpcode, opcode, eventName), true); 728ManifestError(SR.Format(SR.EventSource_UndefinedKeyword, "0x" + bit.ToString("x", CultureInfo.CurrentCulture), eventName), true); 872ManifestError(SR.Format(SR.EventSource_UnsupportedMessageProperty, evtName, eventMessage));
src\runtime\src\libraries\System.Private.CoreLib\src\System\Double.cs (2)
457throw new InvalidCastException(SR.Format(SR.InvalidCast_FromTo, "Double", "Char")); 517throw new InvalidCastException(SR.Format(SR.InvalidCast_FromTo, "Double", "DateTime"));
src\runtime\src\libraries\System.Private.CoreLib\src\System\Enum.cs (5)
404throw new ArgumentException(SR.Format(SR.Argument_EnumTypeDoesNotMatch, flag.GetType(), GetType())); 1290throw new ArgumentException(SR.Format(SR.Arg_EnumAndObjectMustBeSameType, target.GetType(), GetType())); 1637throw new ArgumentException(SR.Format(SR.Arg_EnumAndObjectMustBeSameType, valueType, rtType)); 1650throw new ArgumentException(SR.Format(SR.Arg_EnumFormatUnderlyingTypeAndObjectMustBeSameType, valueType, underlyingType)); 2191DateTime IConvertible.ToDateTime(IFormatProvider? provider) => throw new InvalidCastException(SR.Format(SR.InvalidCast_FromTo, "Enum", "DateTime"));
src\runtime\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\runtime\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\runtime\src\libraries\System.Private.CoreLib\src\System\Globalization\CultureData.cs (1)
520SR.Format(SR.ArgumentOutOfRange_Range, CultureTypes.NeutralCultures, CultureTypes.FrameworkCultures));
src\runtime\src\libraries\System.Private.CoreLib\src\System\Globalization\CultureInfo.cs (1)
1088throw new CultureNotFoundException("name/altName", SR.Format(SR.Argument_OneOfCulturesNotSupported, name, altName));
src\runtime\src\libraries\System.Private.CoreLib\src\System\Globalization\DateTimeFormatInfo.cs (2)
643SR.Format(SR.ArgumentOutOfRange_Range, DayOfWeek.Sunday, DayOfWeek.Saturday)); 673SR.Format(SR.ArgumentOutOfRange_Range, CalendarWeekRule.FirstDay, CalendarWeekRule.FirstFourDayWeek));
src\runtime\src\libraries\System.Private.CoreLib\src\System\Globalization\DateTimeParse.cs (2)
5313return new FormatException(SR.Format(SR.Format_BadDateTimeCalendar, new string(result.failureSpanArgument), result.calendar)); 5331return new FormatException(SR.Format(SR.Format_UnknownDateTimeWord, new string(result.failureSpanArgument), result.failureIntArgument));
src\runtime\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\runtime\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\runtime\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\runtime\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\runtime\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\runtime\src\libraries\System.Private.CoreLib\src\System\Globalization\JapaneseCalendar.cs (1)
276SR.Format(SR.ArgumentOutOfRange_Range, 99, _helper.MaxYear));
src\runtime\src\libraries\System.Private.CoreLib\src\System\Globalization\JapaneseLunisolarCalendar.cs (1)
148SR.Format(SR.ArgumentOutOfRange_Range, MinLunisolarYear, MaxLunisolarYear));
src\runtime\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\runtime\src\libraries\System.Private.CoreLib\src\System\Globalization\KoreanCalendar.cs (1)
169SR.Format(SR.ArgumentOutOfRange_Range, 99, _helper.MaxYear));
src\runtime\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\runtime\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\runtime\src\libraries\System.Private.CoreLib\src\System\Globalization\TaiwanCalendar.cs (1)
168SR.Format(SR.ArgumentOutOfRange_Range, 99, _helper.MaxYear));
src\runtime\src\libraries\System.Private.CoreLib\src\System\Globalization\TaiwanLunisolarCalendar.cs (1)
204SR.Format(SR.ArgumentOutOfRange_Range, MinLunisolarYear, MaxLunisolarYear));
src\runtime\src\libraries\System.Private.CoreLib\src\System\Globalization\ThaiBuddhistCalendar.cs (1)
150SR.Format(SR.ArgumentOutOfRange_Range, 99, _helper.MaxYear));
src\runtime\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\runtime\src\libraries\System.Private.CoreLib\src\System\Int16.cs (1)
246throw new InvalidCastException(SR.Format(SR.InvalidCast_FromTo, "Int16", "DateTime"));
src\runtime\src\libraries\System.Private.CoreLib\src\System\Int32.cs (1)
261throw new InvalidCastException(SR.Format(SR.InvalidCast_FromTo, "Int32", "DateTime"));
src\runtime\src\libraries\System.Private.CoreLib\src\System\Int64.cs (1)
258throw new InvalidCastException(SR.Format(SR.InvalidCast_FromTo, "Int64", "DateTime"));
src\runtime\src\libraries\System.Private.CoreLib\src\System\IO\DirectoryInfo.cs (1)
101throw new ArgumentException(SR.Format(SR.Argument_InvalidSubPath, path, FullPath), nameof(path));
src\runtime\src\libraries\System.Private.CoreLib\src\System\IO\FileStream.cs (1)
180throw new ArgumentException(SR.Format(SR.Argument_InvalidFileModeAndAccessCombo, options.Mode, options.Access), nameof(options));
src\runtime\src\libraries\System.Private.CoreLib\src\System\IO\FileSystem.Unix.cs (1)
146throw new IOException(SR.Format(SR.IO_CannotReplaceSameFile, sourceFullPath, destFullPath));
src\runtime\src\libraries\System.Private.CoreLib\src\System\IO\SharedMemoryManager.Unix.cs (5)
442throw new IOException(SR.Format(SR.IO_SharedMemory_FileNotOwnedByUid, sharedMemoryFilePath, id.Uid)); 458throw new IOException(SR.Format(SR.IO_SharedMemory_FilePermissionsIncorrect, sharedMemoryFilePath, PermissionsMask_OwnerUser_ReadWrite)); 659throw new IOException(SR.Format(SR.IO_SharedMemory_DirectoryNotOwnedByUid, directoryPath, id.Uid)); 678throw new IOException(SR.Format(SR.IO_SharedMemory_DirectoryPermissionsIncorrectUserScope, directoryPath, Convert.ToString(fileStatus.Mode, 8))); 693throw new IOException(SR.Format(SR.IO_SharedMemory_DirectoryOwnerPermissionsIncorrect, directoryPath, Convert.ToString(fileStatus.Mode, 8)));
src\runtime\src\libraries\System.Private.CoreLib\src\System\IO\Strategies\FileStreamHelpers.cs (1)
108throw new ArgumentException(SR.Format(SR.Argument_InvalidFileModeAndAccessCombo, mode, access), nameof(access));
src\runtime\src\libraries\System.Private.CoreLib\src\System\Math.cs (1)
1530throw new ArgumentException(SR.Format(SR.Argument_MinMaxValue, min, max));
src\runtime\src\libraries\System.Private.CoreLib\src\System\MissingFieldException.cs (1)
57return SR.Format(SR.MissingField_Name, ClassName, MemberName);
src\runtime\src\libraries\System.Private.CoreLib\src\System\MissingMemberException.cs (1)
70return SR.Format(SR.MissingMember_Name, ClassName, MemberName);
src\runtime\src\libraries\System.Private.CoreLib\src\System\MissingMethodException.cs (1)
52SR.Format(SR.MissingMethod_Name, ClassName, MemberName);
src\runtime\src\libraries\System.Private.CoreLib\src\System\Random.cs (1)
725throw new ArgumentOutOfRangeException("minValue", SR.Format(SR.Argument_MinMaxValue, "minValue", "maxValue"));
src\runtime\src\libraries\System.Private.CoreLib\src\System\Reflection\Emit\TypeBuilder.cs (2)
130throw new ArgumentException(SR.Format(SR.Argument_MismatchedArrays, nameof(parameterTypeOptionalCustomModifiers), nameof(parameterTypes))); 133throw new ArgumentException(SR.Format(SR.Argument_MismatchedArrays, nameof(parameterTypeRequiredCustomModifiers), nameof(parameterTypes)));
src\runtime\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\runtime\src\libraries\System.Private.CoreLib\src\System\Resources\ResourceManager.cs (1)
540throw new ArgumentException(SR.Format(SR.Arg_InvalidSatelliteContract_Asm_Ver, a, v));
src\runtime\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\runtime\src\libraries\System.Private.CoreLib\src\System\Resources\ResourceReader.cs (1)
842throw new ArgumentException(SR.Format(SR.Arg_ResourceFileUnsupportedVersion, CurrentVersion, version));
src\runtime\src\libraries\System.Private.CoreLib\src\System\Runtime\InteropServices\Marshalling\ComVariant.cs (2)
416_ => throw new ArgumentException(SR.Format(SR.ComVariant_SizeMustMatchVariantSize, nameof(T), nameof(vt))) 431throw new InvalidOperationException(SR.Format(SR.ComVariant_TypeIsNotSupportedType, VarType, string.Join(", ", requiredType.ToArray())));
src\runtime\src\libraries\System.Private.CoreLib\src\System\Runtime\InteropServices\NativeLibrary.Unix.cs (1)
45throw new DllNotFoundException(SR.Format(SR.DllNotFound_Linux, libraryName, _errorMessage));
src\runtime\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\runtime\src\libraries\System.Private.CoreLib\src\System\SByte.cs (1)
249throw new InvalidCastException(SR.Format(SR.InvalidCast_FromTo, "SByte", "DateTime"));
src\runtime\src\libraries\System.Private.CoreLib\src\System\Single.cs (2)
450throw new InvalidCastException(SR.Format(SR.InvalidCast_FromTo, "Single", "Char")); 510throw new InvalidCastException(SR.Format(SR.InvalidCast_FromTo, "Single", "DateTime"));
src\runtime\src\libraries\System.Private.CoreLib\src\System\StartupHookProvider.cs (1)
217throw new ArgumentException(SR.Format(SR.Argument_InvalidStartupHookSignature,
src\runtime\src\libraries\System.Private.CoreLib\src\System\Text\DecoderExceptionFallback.cs (1)
66SR.Format(SR.Argument_InvalidCodePageBytesIndex,
src\runtime\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\runtime\src\libraries\System.Private.CoreLib\src\System\Text\EncoderLatin1BestFitFallback.cs (2)
57SR.Format(SR.ArgumentOutOfRange_Range, 62SR.Format(SR.ArgumentOutOfRange_Range,
src\runtime\src\libraries\System.Private.CoreLib\src\System\Text\EncoderNLS.cs (1)
243throw new ArgumentException(SR.Format(SR.Argument_EncoderFallbackNotEmpty, Encoding.EncodingName, _fallbackBuffer.GetType()));
src\runtime\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\runtime\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\runtime\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\runtime\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\runtime\src\libraries\System.Private.CoreLib\src\System\ThrowHelper.cs (6)
119throw 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\runtime\src\libraries\System.Private.CoreLib\src\System\TimeOnly.cs (2)
929throw new FormatException(SR.Format(SR.Format_DateTimeOnlyContainsNoneDateParts, s.ToString(), nameof(TimeOnly))); 1051throw new FormatException(SR.Format(SR.Format_DateTimeOnlyContainsNoneDateParts, format.ToString(), nameof(TimeOnly)));
src\runtime\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\runtime\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\runtime\src\libraries\System.Private.CoreLib\src\System\UInt16.cs (1)
240throw new InvalidCastException(SR.Format(SR.InvalidCast_FromTo, "UInt16", "DateTime"));
src\runtime\src\libraries\System.Private.CoreLib\src\System\UInt32.cs (1)
256throw new InvalidCastException(SR.Format(SR.InvalidCast_FromTo, "UInt32", "DateTime"));
src\runtime\src\libraries\System.Private.CoreLib\src\System\UInt64.cs (1)
255throw new InvalidCastException(SR.Format(SR.InvalidCast_FromTo, "UInt64", "DateTime"));
src\runtime\src\libraries\System.Private.CoreLib\src\System\Version.cs (1)
223throw new ArgumentException(SR.Format(SR.ArgumentOutOfRange_Bounds_Lower_Upper, "0", failureUpperBound), nameof(fieldCount));
System\Array.NativeAot.cs (1)
411throw new InvalidCastException(SR.Format(SR.Arg_ObjObjEx, value.GetType(), Type.GetTypeFromHandle(new RuntimeTypeHandle(pElementEEType))));
System\GC.NativeAot.cs (3)
214SR.Format(SR.ArgumentOutOfRange_Bounds_Lower_Upper, 1, 99)); 221SR.Format(SR.ArgumentOutOfRange_Bounds_Lower_Upper, 1, 99)); 782SR.Format(
System\InvokeUtils.cs (1)
434return new ArgumentException(SR.Format(SR.Arg_ObjObjEx, Type.GetTypeFromHandle(new RuntimeTypeHandle(srcEEType)), destinationTypeName));
System\Reflection\Runtime\General\Helpers.cs (1)
80string message = SR.Format(SR.TypeLoad_ResolveTypeFromAssembly, typeName, assemblyName);
System\Reflection\Runtime\MethodInfos\RuntimeNamedMethodInfo.cs (1)
145throw new ArgumentException(SR.Format(SR.Argument_NotEnoughGenArguments, typeArguments.Length, GenericTypeParameters.Length));
System\Reflection\TypeNameResolver.NativeAot.cs (2)
149SR.Format(SR.TypeLoad_ResolveTypeFromAssembly, escapedTypeName, assembly.FullName), 237throw new TypeLoadException(SR.Format(SR.TypeLoad_ResolveNestedType,
System\Runtime\InteropServices\IDynamicInterfaceCastable.cs (3)
62throw new InvalidCastException(SR.Format(SR.InvalidCast_FromTo, instance.GetType(), Type.GetTypeFromMethodTable(interfaceType))); 73throw new InvalidOperationException(SR.Format(SR.IDynamicInterfaceCastable_MissingImplementationAttribute, Type.GetTypeFromMethodTable(resolvedImplType), nameof(DynamicInterfaceCastableImplementationAttribute))); 87throw new InvalidOperationException(SR.Format(SR.IDynamicInterfaceCastable_DoesNotImplementRequested, Type.GetTypeFromMethodTable(resolvedImplType), Type.GetTypeFromMethodTable(interfaceType)));
System\RuntimeType.NativeAot.cs (3)
161throw new ArgumentException(SR.Format(SR.Arg_EnumUnderlyingTypeAndObjectMustBeSameType, value.GetType(), Enum.InternalGetUnderlyingType(this))); 169throw new ArgumentException(SR.Format(SR.Arg_EnumAndObjectMustBeSameType, value.GetType(), this)); 175throw new ArgumentException(SR.Format(SR.Arg_EnumUnderlyingTypeAndObjectMustBeSameType, value.GetType(), underlyingType));