src\libraries\Common\src\Interop\Unix\Interop.IOErrors.cs (18)
126new FileNotFoundException(SR.Format(SR.IO_FileNotFound_FileName, path), path) :
127new FileNotFoundException(SR.IO_FileNotFound);
133new DirectoryNotFoundException(SR.Format(SR.IO_PathNotFound_Path, path)) :
134new DirectoryNotFoundException(SR.IO_PathNotFound_NoPathName);
141new UnauthorizedAccessException(SR.Format(SR.UnauthorizedAccess_IODenied_Path, path), inner) :
142new UnauthorizedAccessException(SR.UnauthorizedAccess_IODenied_NoPathName, inner);
146new PathTooLongException(SR.Format(SR.IO_PathTooLong_Path, path)) :
147new PathTooLongException(SR.IO_PathTooLong);
151new IOException(SR.Format(SR.IO_SharingViolation_File, path), errorInfo.RawErrno) :
152new IOException(SR.IO_SharingViolation_NoFileName, errorInfo.RawErrno);
158return new ArgumentOutOfRangeException("value", SR.ArgumentOutOfRange_FileLengthTooBig);
163return new IOException(SR.Format(SR.IO_FileExists_Name, path), errorInfo.RawErrno);
src\libraries\Common\src\System\IO\Win32Marshal.cs (19)
35string.IsNullOrEmpty(path) ? SR.IO_FileNotFound : SR.Format(SR.IO_FileNotFound_FileName, path), path);
38string.IsNullOrEmpty(path) ? SR.IO_PathNotFound_NoPathName : SR.Format(SR.IO_PathNotFound_Path, path));
41string.IsNullOrEmpty(path) ? SR.UnauthorizedAccess_IODenied_NoPathName : SR.Format(SR.UnauthorizedAccess_IODenied_Path, path));
45return new IOException(SR.Format(SR.IO_AlreadyExists_Name, path), MakeHRFromErrorCode(errorCode));
48string.IsNullOrEmpty(path) ? SR.IO_PathTooLong : SR.Format(SR.IO_PathTooLong_Path, path));
51string.IsNullOrEmpty(path) ? SR.IO_SharingViolation_NoFileName : SR.Format(SR.IO_SharingViolation_File, path),
56return new IOException(SR.Format(SR.IO_FileExists_Name, path), MakeHRFromErrorCode(errorCode));
src\libraries\System.Private.CoreLib\src\System\ArgumentOutOfRangeException.cs (25)
25: base(SR.Arg_ArgumentOutOfRangeException)
31: base(SR.Arg_ArgumentOutOfRangeException, paramName)
37: base(message ?? SR.Arg_ArgumentOutOfRangeException, paramName)
43: base(message ?? SR.Arg_ArgumentOutOfRangeException, innerException)
49: base(message ?? SR.Arg_ArgumentOutOfRangeException, paramName)
78string valueMessage = SR.Format(SR.ArgumentOutOfRange_ActualValue, _actualValue);
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));
104throw new ArgumentOutOfRangeException(paramName, value, SR.Format(SR.ArgumentOutOfRange_Generic_MustBeLessOrEqual, paramName, value, other));
108throw new ArgumentOutOfRangeException(paramName, value, SR.Format(SR.ArgumentOutOfRange_Generic_MustBeLess, paramName, value, other));
112throw new ArgumentOutOfRangeException(paramName, value, SR.Format(SR.ArgumentOutOfRange_Generic_MustBeGreaterOrEqual, paramName, value, other));
116throw new ArgumentOutOfRangeException(paramName, value, SR.Format(SR.ArgumentOutOfRange_Generic_MustBeGreater, paramName, value, other));
120throw new ArgumentOutOfRangeException(paramName, value, SR.Format(SR.ArgumentOutOfRange_Generic_MustBeNotEqual, paramName, (object?)value ?? "null", (object?)other ?? "null"));
124throw new ArgumentOutOfRangeException(paramName, value, SR.Format(SR.ArgumentOutOfRange_Generic_MustBeEqual, paramName, (object?)value ?? "null", (object?)other ?? "null"));
src\libraries\System.Private.CoreLib\src\System\Char.cs (18)
145throw new ArgumentException(SR.Arg_MustBeChar);
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"));
1039throw new ArgumentOutOfRangeException(nameof(utf32), SR.ArgumentOutOfRange_InvalidUTF32);
1081message: SR.ArgumentOutOfRange_InvalidHighSurrogate);
1087message: SR.ArgumentOutOfRange_InvalidLowSurrogate);
1133throw new ArgumentException(SR.Format(invalidIsLow ? SR.Argument_InvalidLowSurrogate : SR.Argument_InvalidHighSurrogate, index), nameof(s));
2003static string IBinaryIntegerParseAndFormatInfo<char>.OverflowMessage => SR.Overflow_Char;
src\libraries\System.Private.CoreLib\src\System\Collections\ArrayList.cs (111)
39if (capacity < 0) throw new ArgumentOutOfRangeException(nameof(capacity), SR.Format(SR.ArgumentOutOfRange_MustBeNonNegNum, nameof(capacity)));
78throw new ArgumentOutOfRangeException(nameof(value), SR.ArgumentOutOfRange_SmallCapacity);
123if (index < 0 || index >= _size) throw new ArgumentOutOfRangeException(nameof(index), SR.ArgumentOutOfRange_IndexMustBeLess);
128if (index < 0 || index >= _size) throw new ArgumentOutOfRangeException(nameof(index), SR.ArgumentOutOfRange_IndexMustBeLess);
195throw new ArgumentException(SR.Argument_InvalidOffLen);
252throw new ArgumentException(SR.Arg_RankMultiDimNotSupported, nameof(array));
265throw new ArgumentException(SR.Argument_InvalidOffLen);
267throw new ArgumentException(SR.Arg_RankMultiDimNotSupported, nameof(array));
330throw new ArgumentException(SR.Argument_InvalidOffLen);
359throw new ArgumentOutOfRangeException(nameof(startIndex), SR.ArgumentOutOfRange_IndexMustBeLessOrEqual);
375throw new ArgumentOutOfRangeException(nameof(startIndex), SR.ArgumentOutOfRange_IndexMustBeLessOrEqual);
376if (count < 0 || startIndex > _size - count) throw new ArgumentOutOfRangeException(nameof(count), SR.ArgumentOutOfRange_Count);
387if (index < 0 || index > _size) throw new ArgumentOutOfRangeException(nameof(index), SR.ArgumentOutOfRange_IndexMustBeLessOrEqual);
408if (index < 0 || index > _size) throw new ArgumentOutOfRangeException(nameof(index), SR.ArgumentOutOfRange_IndexMustBeLessOrEqual);
453throw new ArgumentOutOfRangeException(nameof(startIndex), SR.ArgumentOutOfRange_IndexMustBeLess);
478throw new ArgumentOutOfRangeException(startIndex >= _size ? nameof(startIndex) : nameof(count), SR.ArgumentOutOfRange_BiggerThanCollection);
516if (index < 0 || index >= _size) throw new ArgumentOutOfRangeException(nameof(index), SR.ArgumentOutOfRange_IndexMustBeLess);
534throw new ArgumentException(SR.Argument_InvalidOffLen);
580throw new ArgumentException(SR.Argument_InvalidOffLen);
594if (index < 0 || index > _size - count) throw new ArgumentOutOfRangeException(nameof(index), SR.ArgumentOutOfRange_IndexMustBeLessOrEqual);
608throw new ArgumentException(SR.Argument_InvalidOffLen);
639throw new ArgumentException(SR.Argument_InvalidOffLen);
722if (value < Count) throw new ArgumentOutOfRangeException(nameof(value), SR.ArgumentOutOfRange_SmallCapacity);
765throw new ArgumentException(SR.Argument_InvalidOffLen);
794throw new NotSupportedException(SR.NotSupported_FixedSizeCollection);
826throw new ArgumentException(SR.Argument_InvalidOffLen);
828throw new ArgumentException(SR.Arg_RankMultiDimNotSupported, nameof(array));
831throw new ArgumentException(SR.Argument_InvalidOffLen);
848throw new ArgumentException(SR.Argument_InvalidOffLen);
865if (startIndex < 0 || startIndex > Count) throw new ArgumentOutOfRangeException(nameof(startIndex), SR.ArgumentOutOfRange_IndexMustBeLessOrEqual);
866if (count < 0 || startIndex > Count - count) throw new ArgumentOutOfRangeException(nameof(count), SR.ArgumentOutOfRange_Count);
895if (index < 0 || index > Count) throw new ArgumentOutOfRangeException(nameof(index), SR.ArgumentOutOfRange_IndexMustBeLessOrEqual);
933if (startIndex < 0 || startIndex >= _list.Count) throw new ArgumentOutOfRangeException(nameof(startIndex), SR.ArgumentOutOfRange_IndexMustBeLess);
934if (count < 0 || count > startIndex + 1) throw new ArgumentOutOfRangeException(nameof(count), SR.ArgumentOutOfRange_Count);
972throw new ArgumentException(SR.Argument_InvalidOffLen);
990throw new ArgumentException(SR.Argument_InvalidOffLen);
1009throw new ArgumentOutOfRangeException(nameof(index), SR.ArgumentOutOfRange_IndexMustBeLessOrEqual);
1028throw new ArgumentException(SR.Argument_InvalidOffLen);
1037throw new ArgumentException(SR.Argument_InvalidOffLen);
1125throw new InvalidOperationException(SR.InvalidOperation_EnumNotStarted);
1127throw new InvalidOperationException(SR.InvalidOperation_EnumEnded);
1615throw new NotSupportedException(SR.NotSupported_FixedSizeCollection);
1620throw new NotSupportedException(SR.NotSupported_FixedSizeCollection);
1645throw new NotSupportedException(SR.NotSupported_FixedSizeCollection);
1650throw new NotSupportedException(SR.NotSupported_FixedSizeCollection);
1655throw new NotSupportedException(SR.NotSupported_FixedSizeCollection);
1691throw new NotSupportedException(SR.NotSupported_FixedSizeCollection);
1696throw new NotSupportedException(SR.NotSupported_FixedSizeCollection);
1707set => throw new NotSupportedException(SR.NotSupported_FixedSizeCollection);
1712throw new NotSupportedException(SR.NotSupported_FixedSizeCollection);
1764throw new NotSupportedException(SR.NotSupported_FixedSizeCollection);
1769throw new NotSupportedException(SR.NotSupported_FixedSizeCollection);
1789throw new NotSupportedException(SR.NotSupported_FixedSizeCollection);
1794throw new NotSupportedException(SR.NotSupported_FixedSizeCollection);
1799throw new NotSupportedException(SR.NotSupported_FixedSizeCollection);
1813throw new ArgumentException(SR.Argument_InvalidOffLen);
1843throw new NotSupportedException(SR.NotSupported_FixedSizeCollection);
1867set => throw new NotSupportedException(SR.NotSupported_ReadOnlyCollection);
1874throw new NotSupportedException(SR.NotSupported_ReadOnlyCollection);
1879throw new NotSupportedException(SR.NotSupported_ReadOnlyCollection);
1904throw new NotSupportedException(SR.NotSupported_ReadOnlyCollection);
1909throw new NotSupportedException(SR.NotSupported_ReadOnlyCollection);
1914throw new NotSupportedException(SR.NotSupported_ReadOnlyCollection);
1938set => throw new NotSupportedException(SR.NotSupported_ReadOnlyCollection);
1945throw new NotSupportedException(SR.NotSupported_ReadOnlyCollection);
1950throw new NotSupportedException(SR.NotSupported_ReadOnlyCollection);
1962set => throw new NotSupportedException(SR.NotSupported_ReadOnlyCollection);
1967throw new NotSupportedException(SR.NotSupported_ReadOnlyCollection);
2019throw new NotSupportedException(SR.NotSupported_ReadOnlyCollection);
2024throw new NotSupportedException(SR.NotSupported_ReadOnlyCollection);
2044throw new NotSupportedException(SR.NotSupported_ReadOnlyCollection);
2049throw new NotSupportedException(SR.NotSupported_ReadOnlyCollection);
2054throw new NotSupportedException(SR.NotSupported_ReadOnlyCollection);
2059throw new NotSupportedException(SR.NotSupported_ReadOnlyCollection);
2067throw new ArgumentException(SR.Argument_InvalidOffLen);
2074throw new NotSupportedException(SR.NotSupported_ReadOnlyCollection);
2079throw new NotSupportedException(SR.NotSupported_ReadOnlyCollection);
2095throw new NotSupportedException(SR.NotSupported_ReadOnlyCollection);
2126if (_version != _list._version) throw new InvalidOperationException(SR.InvalidOperation_EnumFailedVersion);
2145throw new InvalidOperationException(SR.InvalidOperation_EnumNotStarted);
2148throw new InvalidOperationException(SR.InvalidOperation_EnumEnded);
2156if (_version != _list._version) throw new InvalidOperationException(SR.InvalidOperation_EnumFailedVersion);
2183throw new InvalidOperationException(SR.InvalidOperation_UnderlyingArrayListChanged);
2219throw new ArgumentException(SR.Argument_InvalidOffLen);
2234if (value < Count) throw new ArgumentOutOfRangeException(nameof(value), SR.ArgumentOutOfRange_SmallCapacity);
2282throw new ArgumentException(SR.Arg_RankMultiDimNotSupported, nameof(array));
2285throw new ArgumentException(SR.Argument_InvalidOffLen);
2296throw new ArgumentException(SR.Arg_RankMultiDimNotSupported, nameof(array));
2300throw new ArgumentException(SR.Argument_InvalidOffLen);
2302throw new ArgumentException(SR.Argument_InvalidOffLen);
2333throw new ArgumentException(SR.Argument_InvalidOffLen);
2344throw new ArgumentException(SR.Argument_InvalidOffLen);
2365throw new ArgumentOutOfRangeException(nameof(startIndex), SR.ArgumentOutOfRange_IndexMustBeLessOrEqual);
2376throw new ArgumentOutOfRangeException(nameof(startIndex), SR.ArgumentOutOfRange_IndexMustBeLessOrEqual);
2379throw new ArgumentOutOfRangeException(nameof(count), SR.ArgumentOutOfRange_Count);
2389if (index < 0 || index > _baseSize) throw new ArgumentOutOfRangeException(nameof(index), SR.ArgumentOutOfRange_IndexMustBeLessOrEqual);
2399if (index < 0 || index > _baseSize) throw new ArgumentOutOfRangeException(nameof(index), SR.ArgumentOutOfRange_IndexMustBeLessOrEqual);
2432throw new ArgumentOutOfRangeException(nameof(startIndex), SR.ArgumentOutOfRange_IndexMustBeLess);
2444if (index < 0 || index >= _baseSize) throw new ArgumentOutOfRangeException(nameof(index), SR.ArgumentOutOfRange_IndexMustBeLess);
2457throw new ArgumentException(SR.Argument_InvalidOffLen);
2475throw new ArgumentException(SR.Argument_InvalidOffLen);
2485if (index < 0 || index >= _baseSize) throw new ArgumentOutOfRangeException(nameof(index), SR.ArgumentOutOfRange_IndexMustBeLess);
2498throw new ArgumentException(SR.Argument_InvalidOffLen);
2510if (index < 0 || index >= _baseSize) throw new ArgumentOutOfRangeException(nameof(index), SR.ArgumentOutOfRange_IndexMustBeLess);
2516if (index < 0 || index >= _baseSize) throw new ArgumentOutOfRangeException(nameof(index), SR.ArgumentOutOfRange_IndexMustBeLess);
2545throw new NotSupportedException(SR.NotSupported_RangeCollection);
2574throw new InvalidOperationException(SR.InvalidOperation_EnumFailedVersion);
2616throw new InvalidOperationException(SR.InvalidOperation_EnumNotStarted);
2620throw new InvalidOperationException(SR.InvalidOperation_EnumEnded);
2632throw new InvalidOperationException(SR.InvalidOperation_EnumFailedVersion);
src\libraries\System.Private.CoreLib\src\System\Convert.cs (33)
138throw new InvalidCastException(SR.InvalidCast_IConvertible);
162TypeCode.DBNull => throw new InvalidCastException(SR.InvalidCast_DBNull),
163TypeCode.Empty => throw new InvalidCastException(SR.InvalidCast_Empty),
164_ => throw new ArgumentException(SR.Arg_UnknownTypeCode),
215throw new InvalidCastException(SR.InvalidCast_DBNull);
217throw new InvalidCastException(SR.InvalidCast_Empty);
219throw new InvalidCastException(SR.Format(SR.InvalidCast_FromTo, value.GetType().FullName, targetType.FullName));
237throw new InvalidCastException(SR.InvalidCast_CannotCastNullToValueType);
248throw new InvalidCastException(SR.InvalidCast_IConvertible);
288private static void ThrowCharOverflowException() { throw new OverflowException(SR.Overflow_Char); }
291private static void ThrowByteOverflowException() { throw new OverflowException(SR.Overflow_Byte); }
294private static void ThrowSByteOverflowException() { throw new OverflowException(SR.Overflow_SByte); }
297private static void ThrowInt16OverflowException() { throw new OverflowException(SR.Overflow_Int16); }
300private static void ThrowUInt16OverflowException() { throw new OverflowException(SR.Overflow_UInt16); }
303private static void ThrowInt32OverflowException() { throw new OverflowException(SR.Overflow_Int32); }
306private static void ThrowUInt32OverflowException() { throw new OverflowException(SR.Overflow_UInt32); }
309private static void ThrowInt64OverflowException() { throw new OverflowException(SR.Overflow_Int64); }
312private static void ThrowUInt64OverflowException() { throw new OverflowException(SR.Overflow_UInt64); }
496throw new FormatException(SR.Format_NeedSingleChar);
1076throw new OverflowException(SR.Overflow_Int32);
1197throw new OverflowException(SR.Overflow_UInt32);
2296private static void ThrowInvalidBase() => throw new ArgumentException(SR.Arg_InvalidBase);
2347throw new ArgumentException(SR.Format(SR.Arg_EnumIllegalVal, (int)options), nameof(options));
2394throw new ArgumentException(SR.Format(SR.Arg_EnumIllegalVal, (int)options), nameof(options));
2433throw new ArgumentException(SR.Format(SR.Arg_EnumIllegalVal, (int)options), nameof(options));
2853throw new FormatException(SR.Format_BadBase64Char);
2911throw new FormatException(SR.Format_BadBase64Char);
2948throw new FormatException(SR.Format_BadHexLength);
2953throw new FormatException(SR.Format_BadHexChar);
src\libraries\System.Private.CoreLib\src\System\DateTime.cs (22)
205private static void ThrowTicksOutOfRange() => throw new ArgumentOutOfRangeException("ticks", SR.ArgumentOutOfRange_DateTimeBadTicks);
206private static void ThrowInvalidKind() => throw new ArgumentException(SR.Argument_InvalidDateTimeKind, "kind");
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));
209private static void ThrowDateArithmetic(int param) => throw new ArgumentOutOfRangeException(param switch { 0 => "value", 1 => "t", _ => "months" }, SR.ArgumentOutOfRange_DateArithmetic);
210private static void ThrowAddOutOfRange() => throw new ArgumentOutOfRangeException("value", SR.ArgumentOutOfRange_AddValue);
844throw new SerializationException(SR.Serialization_MissingDateTimeData);
849throw new SerializationException(SR.Serialization_DateTimeTicksOutOfRange);
963if (months < -120000 || months > 120000) throw new ArgumentOutOfRangeException(nameof(months), SR.ArgumentOutOfRange_DateTimeBadMonths);
1025throw new ArgumentOutOfRangeException(nameof(value), SR.ArgumentOutOfRange_DateTimeBadYears);
1069throw new ArgumentException(SR.Arg_MustBeDateTime);
1164throw new ArgumentException(SR.Arg_OleAutDateInvalid);
1178if (millis < 0 || millis > MaxMillis) throw new ArgumentException(SR.Arg_OleAutDateScale);
1244throw new ArgumentException(SR.Argument_DateTimeBadBinaryData, nameof(dateData));
1251throw new ArgumentException(SR.Argument_DateTimeBadBinaryData, nameof(dateData));
1269throw new ArgumentOutOfRangeException(nameof(fileTime), SR.ArgumentOutOfRange_FileTimeInvalid);
1670throw new OverflowException(SR.Arg_OleAutDateInvalid);
1708throw new ArgumentOutOfRangeException(null, SR.ArgumentOutOfRange_FileTimeInvalid);
1973private static InvalidCastException InvalidCast(string to) => new InvalidCastException(SR.Format(SR.InvalidCast_FromTo, nameof(DateTime), to));
src\libraries\System.Private.CoreLib\src\System\Diagnostics\Tracing\EventSource.cs (84)
388throw new ArgumentException(SR.Argument_InvalidTypeName, nameof(eventSourceType));
508throw new ArgumentException(SR.EventSource_InvalidCommand, nameof(command));
556return SR.Format(SR.EventSource_ToString, Name, Guid);
1644throw new ArgumentException(SR.EventSource_TraitEven, nameof(traits));
1649throw new ArgumentException(SR.EventSource_NeedGuid);
1654throw new ArgumentException(SR.EventSource_NeedName);
1996throw new ArgumentException(SR.EventSource_NoRelatedActivityId);
2111ReportOutOfBandMessage(SR.Format(SR.EventSource_EventParametersMismatch, eventId, args.Length, infos.Length));
2127ReportOutOfBandMessage(SR.Format(SR.EventSource_VarArgsParameterMismatch, eventId, infos[i].Name));
2140ReportOutOfBandMessage(SR.Format(SR.EventSource_EventParametersMismatch, eventCallbackArgs.EventId, eventDataCount, metadata.Parameters.Length));
2420ReportOutOfBandMessage(errorPrefix + ": " + SR.EventSource_EventTooBig);
2421if (ThrowOnEventWriteErrors) throw new EventSourceException(SR.EventSource_EventTooBig, innerEx);
2424ReportOutOfBandMessage(errorPrefix + ": " + SR.EventSource_NoFreeBuffers);
2425if (ThrowOnEventWriteErrors) throw new EventSourceException(SR.EventSource_NoFreeBuffers, innerEx);
2428ReportOutOfBandMessage(errorPrefix + ": " + SR.EventSource_NullInput);
2429if (ThrowOnEventWriteErrors) throw new EventSourceException(SR.EventSource_NullInput, innerEx);
2432ReportOutOfBandMessage(errorPrefix + ": " + SR.EventSource_TooManyArgs);
2433if (ThrowOnEventWriteErrors) throw new EventSourceException(SR.EventSource_TooManyArgs, innerEx);
2674throw new ArgumentException(SR.EventSource_ListenerNotFound);
2886throw new ArgumentException(SR.Format(SR.EventSource_EventSourceGuidInUse, m_guid));
3193manifest.ManifestError(SR.EventSource_TypeMustDeriveFromEventSource);
3197manifest.ManifestError(SR.EventSource_TypeMustBeSealedOrAbstract);
3209manifest.ManifestError(SR.Format(SR.EventSource_AbstractMustNotDeclareKTOC, nestedType.Name));
3251manifest.ManifestError(SR.Format(SR.EventSource_AbstractMustNotDeclareEventMethods, method.Name, eventAttribute.EventId));
3280manifest.ManifestError(SR.EventSource_NeedPositiveId, true);
3285manifest.ManifestError(SR.Format(SR.EventSource_EventMustNotBeExplicitImplementation, method.Name, eventAttribute.EventId));
3341throw new ArgumentException(SR.EventSource_StopsFollowStarts);
3490manifest.ManifestError(SR.Format(SR.EventSource_EnumKindMismatch, staticField.FieldType.Name, providerEnumKind));
3610manifest.ManifestError(SR.Format(SR.EventSource_MismatchIdToWriteEvent, evtName, evtId, eventArg), true);
3615manifest.ManifestError(SR.Format(SR.EventSource_EventIdReused, evtName, evtId), true);
3629manifest.ManifestError(SR.Format(SR.EventSource_TaskOpcodePairReused,
3654manifest.ManifestError(SR.Format(SR.EventSource_EventMustHaveTaskIfNonDefaultOpcode, evtName, evtId));
3671manifest.ManifestError(SR.Format(SR.EventSource_EventNameReused, evtName), true);
3852throw new ArgumentException(SR.EventSource_InvalidEventFormat, nameof(settings));
4605throw new InvalidOperationException(SR.EventSource_ListenerCreatedInsideCallback);
5361ManifestError(SR.Format(SR.EventSource_IllegalOpcodeValue, name, value));
5366ManifestError(SR.Format(SR.EventSource_OpcodeCollision, name, prevName, value));
5379ManifestError(SR.Format(SR.EventSource_IllegalTaskValue, name, value));
5384ManifestError(SR.Format(SR.EventSource_TaskCollision, name, prevName, value));
5396ManifestError(SR.Format(SR.EventSource_KeywordNeedPowerOfTwo, $"0x{value:x}", name), true);
5402ManifestError(SR.Format(SR.EventSource_IllegalKeywordsValue, name, $"0x{value:x}"));
5407ManifestError(SR.Format(SR.EventSource_KeywordCollision, name, prevName, $"0x{value:x}"));
5422ManifestError(SR.Format(SR.EventSource_EventChannelOutOfRange, name, value));
5428ManifestError(SR.Format(SR.EventSource_ChannelTypeDoesNotMatchEventChannelValue,
5606ManifestError(SR.EventSource_MaxChannelExceeded);
5873ManifestError(SR.Format(SR.EventSource_DuplicateStringKey, key), true);
5925ManifestError(SR.Format(SR.EventSource_UndefinedChannel, channel, eventName));
5937ManifestError(SR.Format(SR.EventSource_UndefinedChannel, channel, eventName));
5945ManifestError(SR.Format(SR.EventSource_EventWithAdminChannelMustHaveMessage, eventName, info.Name));
5989ManifestError(SR.Format(SR.EventSource_UndefinedOpcode, opcode, eventName), true);
6017ManifestError(SR.Format(SR.EventSource_UndefinedKeyword, "0x" + bit.ToString("x", CultureInfo.CurrentCulture), eventName), true);
6087ManifestError(SR.Format(SR.EventSource_UnsupportedEventTypeInManifest, type.Name), true);
6161ManifestError(SR.Format(SR.EventSource_UnsupportedMessageProperty, evtName, eventMessage));
src\libraries\System.Private.CoreLib\src\System\Enum.cs (20)
404throw new ArgumentException(SR.Format(SR.Argument_EnumTypeDoesNotMatch, flag.GetType(), GetType()));
887throw new ArgumentException(SR.Arg_MustBeEnum, nameof(TEnum));
1121throw new ArgumentException(SR.Format(SR.Arg_EnumValueNotFound, originalValue.ToString()));
1289throw new ArgumentException(SR.Format(SR.Arg_EnumAndObjectMustBeSameType, target.GetType(), GetType()));
1602throw new InvalidOperationException(SR.InvalidOperation_UnknownEnumType);
1636throw new ArgumentException(SR.Format(SR.Arg_EnumAndObjectMustBeSameType, valueType, rtType));
1649throw new ArgumentException(SR.Format(SR.Arg_EnumFormatUnderlyingTypeAndObjectMustBeSameType, valueType, underlyingType));
2147throw new ArgumentException(enumType is not RuntimeType ? SR.Arg_MustBeType : SR.Arg_MustBeEnum, nameof(enumType));
2150throw new ArgumentException(SR.Arg_MustContainEnumInfo, "value");
2154new FormatException(SR.Format_InvalidEnumFormatSpecification);
2158new InvalidOperationException(SR.InvalidOperation_UnknownEnumType);
2190DateTime IConvertible.ToDateTime(IFormatProvider? provider) => throw new InvalidCastException(SR.Format(SR.InvalidCast_FromTo, "Enum", "DateTime"));
2220throw new ArgumentException(SR.Arg_MustBeEnumBaseTypeOrEnum, nameof(value));
src\libraries\System.Private.CoreLib\src\System\Environment.cs (8)
156throw new ArgumentOutOfRangeException(nameof(folder), folder, SR.Format(SR.Arg_EnumIllegalVal, folder));
159throw new ArgumentOutOfRangeException(nameof(option), option, SR.Format(SR.Arg_EnumIllegalVal, option));
262throw new ArgumentOutOfRangeException(nameof(target), target, SR.Format(SR.Arg_EnumIllegalVal, target));
270throw new ArgumentException(SR.Argument_StringFirstCharIsZero, nameof(variable));
273throw new ArgumentException(SR.Argument_IllegalEnvVarName, nameof(variable));
src\libraries\System.Private.CoreLib\src\System\Globalization\Calendar.cs (11)
79throw new InvalidOperationException(SR.InvalidOperation_ReadOnly);
114throw new ArgumentException(SR.Format(SR.Argument_ResultCalendarRange, minValue, maxValue));
130throw new ArgumentOutOfRangeException(nameof(value), value, SR.ArgumentOutOfRange_AddValue);
481SR.Format(SR.ArgumentOutOfRange_Range, DayOfWeek.Sunday, DayOfWeek.Saturday));
492SR.Format(SR.ArgumentOutOfRange_Range, CalendarWeekRule.FirstDay, CalendarWeekRule.FirstFourDayWeek)),
671throw new ArgumentOutOfRangeException(null, SR.ArgumentOutOfRange_BadHourMinuteSecond);
678SR.Format(SR.ArgumentOutOfRange_Range, 0, TimeSpan.MillisecondsPerSecond - 1));
src\libraries\System.Private.CoreLib\src\System\Globalization\ChineseLunisolarCalendar.cs (5)
258throw new ArgumentOutOfRangeException("year", lunarYear, SR.Format(SR.ArgumentOutOfRange_Range, MinLunisolarYear, MaxLunisolarYear));
273throw new ArgumentOutOfRangeException(nameof(era), era, SR.ArgumentOutOfRange_InvalidEraValue);
277throw new ArgumentOutOfRangeException(nameof(year), year, SR.Format(SR.ArgumentOutOfRange_Range, MinLunisolarYear, MaxLunisolarYear));
src\libraries\System.Private.CoreLib\src\System\Globalization\CultureInfo.cs (14)
156private static string GetCultureNotSupportedExceptionMessage() => GlobalizationMode.Invariant ? SR.Argument_CultureNotSupportedInInvariantMode : SR.Argument_CultureNotSupported;
205throw new CultureNotFoundException(nameof(culture), culture, SR.Argument_CultureNotSupported);
329throw new ArgumentException(SR.Format(SR.Argument_InvalidResourceCultureName, cultureName));
978throw new InvalidOperationException(SR.InvalidOperation_ReadOnly);
1092throw new CultureNotFoundException("name/altName", SR.Format(SR.Argument_OneOfCulturesNotSupported, name, altName));
1112throw new CultureNotFoundException(nameof(name), name, SR.Format(SR.Argument_InvalidPredefinedCultureName, name));
1154throw new CultureNotFoundException(nameof(name), SR.Format(SR.Argument_CultureIetfNotSupported, name));
1162throw new CultureNotFoundException(nameof(name), SR.Format(SR.Argument_CultureIetfNotSupported, name));
src\libraries\System.Private.CoreLib\src\System\Globalization\DateTimeFormatInfo.cs (53)
358throw new InvalidOperationException(SR.InvalidOperation_ReadOnly);
388throw new InvalidOperationException(SR.InvalidOperation_ReadOnly);
464throw new ArgumentOutOfRangeException(nameof(value), value, SR.Argument_InvalidCalendar);
543throw new ArgumentOutOfRangeException(nameof(era), era + 1, SR.ArgumentOutOfRange_InvalidEraValue);
572throw new ArgumentOutOfRangeException(nameof(era), era + 1, SR.ArgumentOutOfRange_InvalidEraValue);
607throw new InvalidOperationException(SR.InvalidOperation_ReadOnly);
641throw new InvalidOperationException(SR.InvalidOperation_ReadOnly);
649SR.Format(SR.ArgumentOutOfRange_Range, DayOfWeek.Sunday, DayOfWeek.Saturday));
672throw new InvalidOperationException(SR.InvalidOperation_ReadOnly);
679SR.Format(SR.ArgumentOutOfRange_Range, CalendarWeekRule.FirstDay, CalendarWeekRule.FirstFourDayWeek));
693throw new InvalidOperationException(SR.InvalidOperation_ReadOnly);
714throw new InvalidOperationException(SR.InvalidOperation_ReadOnly);
748throw new InvalidOperationException(SR.InvalidOperation_ReadOnly);
790throw new InvalidOperationException(SR.InvalidOperation_ReadOnly);
810throw new InvalidOperationException(SR.InvalidOperation_ReadOnly);
844throw new InvalidOperationException(SR.InvalidOperation_ReadOnly);
880throw new InvalidOperationException(SR.InvalidOperation_ReadOnly);
992throw new InvalidOperationException(SR.InvalidOperation_ReadOnly);
1026throw new InvalidOperationException(SR.InvalidOperation_ReadOnly);
1054throw new ArgumentNullException("value", SR.ArgumentNull_ArrayValue);
1066throw new InvalidOperationException(SR.InvalidOperation_ReadOnly);
1071throw new ArgumentException(SR.Format(SR.Argument_InvalidArrayLength, 7), nameof(value));
1091throw new InvalidOperationException(SR.InvalidOperation_ReadOnly);
1096throw new ArgumentException(SR.Format(SR.Argument_InvalidArrayLength, 7), nameof(value));
1111throw new InvalidOperationException(SR.InvalidOperation_ReadOnly);
1116throw new ArgumentException(SR.Format(SR.Argument_InvalidArrayLength, 7), nameof(value));
1133throw new InvalidOperationException(SR.InvalidOperation_ReadOnly);
1138throw new ArgumentException(SR.Format(SR.Argument_InvalidArrayLength, 13), nameof(value));
1154throw new InvalidOperationException(SR.InvalidOperation_ReadOnly);
1159throw new ArgumentException(SR.Format(SR.Argument_InvalidArrayLength, 13), nameof(value));
1327_ => throw new ArgumentException(SR.Format(SR.Format_BadFormatSpecifier, format), nameof(format)),
1597throw new InvalidOperationException(SR.InvalidOperation_ReadOnly);
1603throw new ArgumentException(SR.Arg_ArrayZeroError, nameof(patterns));
1610throw new ArgumentNullException(nameof(patterns) + "[" + i + "]", SR.ArgumentNull_ArrayValue);
1649throw new ArgumentException(SR.Format(SR.Format_BadFormatSpecifier, format), nameof(format));
1660throw new InvalidOperationException(SR.InvalidOperation_ReadOnly);
1665throw new ArgumentException(SR.Format(SR.Argument_InvalidArrayLength, 13), nameof(value));
1681throw new InvalidOperationException(SR.InvalidOperation_ReadOnly);
1686throw new ArgumentException(SR.Format(SR.Argument_InvalidArrayLength, 13), nameof(value));
1744string message = (style & InvalidDateTimeStyles) != 0 ? SR.Argument_InvalidDateTimeStyles
1745: (style & localUniversal) == localUniversal ? SR.Argument_ConflictingDateTimeStyles
1746: SR.Argument_ConflictingDateTimeRoundtripStyles;
src\libraries\System.Private.CoreLib\src\System\Globalization\DateTimeParse.cs (26)
5202return new ArgumentNullException("formats", SR.ArgumentNull_String);
5204return new FormatException(SR.Format(SR.Format_BadDatePattern, new string(result.failureSpanArgument)));
5206return new FormatException(SR.Format(SR.Format_BadDateTime, new string(result.failureSpanArgument)));
5208return new FormatException(SR.Format(SR.Format_BadDateTimeCalendar, new string(result.failureSpanArgument), result.calendar));
5210return new FormatException(SR.Format(SR.Format_BadDayOfWeek, new string(result.failureSpanArgument)));
5212return new FormatException(SR.Format(SR.Format_BadFormatSpecifier, new string(result.failureSpanArgument)));
5214return new FormatException(SR.Format(SR.Format_BadQuote, (char)result.failureIntArgument));
5216return new FormatException(SR.Format(SR.Format_DateOutOfRange, new string(result.failureSpanArgument)));
5218return new FormatException(SR.Format(SR.Format_MissingIncompleteDate, new string(result.failureSpanArgument)));
5220return new FormatException(SR.Format_NoFormatSpecifier);
5222return new FormatException(SR.Format(SR.Format_OffsetOutOfRange, new string(result.failureSpanArgument)));
5224return new FormatException(SR.Format(SR.Format_RepeatDateTimePattern, (char)result.failureIntArgument));
5226return new FormatException(SR.Format(SR.Format_UnknownDateTimeWord, new string(result.failureSpanArgument), result.failureIntArgument));
5228return new FormatException(SR.Format(SR.Format_UTCOutOfRange, new string(result.failureSpanArgument)));
src\libraries\System.Private.CoreLib\src\System\Globalization\EastAsianLunisolarCalendar.cs (20)
41SR.Format(SR.ArgumentOutOfRange_Range, 1, 60));
58SR.Format(SR.ArgumentOutOfRange_Range, 1, 60));
104throw new ArgumentOutOfRangeException(nameof(era), era, SR.ArgumentOutOfRange_InvalidEraValue);
134throw new ArgumentOutOfRangeException(nameof(era), era, SR.ArgumentOutOfRange_InvalidEraValue);
148SR.Format(CultureInfo.InvariantCulture, SR.ArgumentOutOfRange_CalendarRange,
162throw new ArgumentOutOfRangeException(nameof(era), era, SR.ArgumentOutOfRange_InvalidEraValue);
176SR.Format(SR.ArgumentOutOfRange_Range, MinEraCalendarYear(era), MaxEraCalendarYear(era)));
253SR.Format(SR.ArgumentOutOfRange_Day, daysInMonth, month));
258throw new ArgumentOutOfRangeException(null, SR.ArgumentOutOfRange_BadYearMonthDay);
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 (31)
54SR.Format(SR.ArgumentOutOfRange_Range, GregorianCalendarTypes.Localized, GregorianCalendarTypes.TransliteratedFrench));
71SR.Format(SR.ArgumentOutOfRange_Range, GregorianCalendarTypes.Localized, GregorianCalendarTypes.TransliteratedFrench));
107throw new ArgumentOutOfRangeException(null, SR.ArgumentOutOfRange_BadYearMonthDay);
144SR.Format(SR.ArgumentOutOfRange_Range, -120000, 120000));
215throw new ArgumentOutOfRangeException(nameof(era), era, SR.ArgumentOutOfRange_InvalidEraValue);
228throw new ArgumentOutOfRangeException(nameof(era), era, SR.ArgumentOutOfRange_InvalidEraValue);
250throw new ArgumentOutOfRangeException(nameof(era), era, SR.ArgumentOutOfRange_InvalidEraValue);
257SR.Format(SR.ArgumentOutOfRange_Range, 1, MaxYear));
296SR.Format(SR.ArgumentOutOfRange_Range, 1, 12));
301throw new ArgumentOutOfRangeException(nameof(era), era, SR.ArgumentOutOfRange_InvalidEraValue);
308SR.Format(SR.ArgumentOutOfRange_Range, 1, MaxYear));
315SR.Format(SR.ArgumentOutOfRange_Range, 1, GetDaysInMonth(year, month)));
330throw new ArgumentOutOfRangeException(nameof(era), era, SR.ArgumentOutOfRange_InvalidEraValue);
337SR.Format(SR.ArgumentOutOfRange_Range, 1, MaxYear));
351throw new ArgumentOutOfRangeException(nameof(era), era, SR.ArgumentOutOfRange_InvalidEraValue);
358SR.Format(SR.ArgumentOutOfRange_Range, 1, MaxYear));
365SR.Format(SR.ArgumentOutOfRange_Range, 1, 12));
379throw new ArgumentOutOfRangeException(nameof(era), era, SR.ArgumentOutOfRange_InvalidEraValue);
392throw new ArgumentOutOfRangeException(nameof(era), era, SR.ArgumentOutOfRange_InvalidEraValue);
430SR.Format(SR.ArgumentOutOfRange_Range, 99, MaxYear));
src\libraries\System.Private.CoreLib\src\System\Globalization\GregorianCalendarHelper.cs (17)
85throw new ArgumentOutOfRangeException(nameof(year), SR.ArgumentOutOfRange_NeedNonNegNum);
136SR.Format(
137SR.ArgumentOutOfRange_Range,
148throw new ArgumentOutOfRangeException(nameof(era), SR.ArgumentOutOfRange_InvalidEraValue);
181SR.Format(
183SR.ArgumentOutOfRange_CalendarRange,
212SR.Format(
213SR.ArgumentOutOfRange_Range,
326throw new ArgumentOutOfRangeException(nameof(time), SR.ArgumentOutOfRange_Era);
374throw new ArgumentException(SR.Argument_NoEra);
395throw new ArgumentException(SR.Argument_NoEra);
408SR.Format(
409SR.ArgumentOutOfRange_Range,
448SR.Format(
449SR.ArgumentOutOfRange_Range,
496SR.Format(SR.ArgumentOutOfRange_Range, m_minYear, m_maxYear));
src\libraries\System.Private.CoreLib\src\System\Globalization\HebrewCalendar.cs (13)
299SR.Format(SR.ArgumentOutOfRange_Range, MinHebrewYear, MaxHebrewYear));
317SR.Format(SR.ArgumentOutOfRange_Range, 1, monthsInYear));
335SR.Format(SR.ArgumentOutOfRange_Range, 1, daysInMonth));
343throw new ArgumentOutOfRangeException(nameof(era), era, SR.ArgumentOutOfRange_InvalidEraValue);
355SR.Format(
357SR.ArgumentOutOfRange_CalendarRange,
370_ => throw new InvalidOperationException(SR.InvalidOperation_DateTimeParsing),
575throw new ArgumentOutOfRangeException(nameof(months), months, SR.ArgumentOutOfRange_AddValue);
884SR.Format(SR.ArgumentOutOfRange_Range, MinHebrewYear, MaxHebrewYear));
src\libraries\System.Private.CoreLib\src\System\Globalization\HijriCalendar.cs (21)
127SR.Format(SR.ArgumentOutOfRange_Bounds_Lower_Upper, MinAdvancedHijri, MaxAdvancedHijri));
142SR.Format(
144SR.ArgumentOutOfRange_CalendarRange,
154throw new ArgumentOutOfRangeException(nameof(era), era, SR.ArgumentOutOfRange_InvalidEraValue);
165SR.Format(SR.ArgumentOutOfRange_Range, 1, MaxCalendarYear));
179SR.Format(SR.ArgumentOutOfRange_Range, 1, MaxCalendarMonth));
264throw new InvalidOperationException(SR.InvalidOperation_DateTimeParsing);
274SR.Format(SR.ArgumentOutOfRange_Range, -120000, 120000));
374SR.Format(SR.ArgumentOutOfRange_Day, daysInMonth, month));
407SR.Format(SR.ArgumentOutOfRange_Day, daysInMonth, month));
413throw new ArgumentOutOfRangeException(null, SR.ArgumentOutOfRange_BadYearMonthDay);
440SR.Format(SR.ArgumentOutOfRange_Range, 99, MaxCalendarYear));
461SR.Format(SR.ArgumentOutOfRange_Range, 1, MaxCalendarYear));
src\libraries\System.Private.CoreLib\src\System\Globalization\IdnMapping.cs (49)
73throw new ArgumentOutOfRangeException(nameof(index), SR.ArgumentOutOfRange_IndexMustBeLessOrEqual);
75throw new ArgumentOutOfRangeException(nameof(unicode), SR.ArgumentOutOfRange_IndexCountBuffer);
79throw new ArgumentException(SR.Argument_IdnBadLabelSize, nameof(unicode));
83throw new ArgumentException(SR.Format(SR.Argument_InvalidCharSequence, index + count - 1), nameof(unicode));
120throw new ArgumentOutOfRangeException(nameof(index), SR.ArgumentOutOfRange_IndexMustBeLessOrEqual);
122throw new ArgumentOutOfRangeException(nameof(ascii), SR.ArgumentOutOfRange_IndexCountBuffer);
128throw new ArgumentException(SR.Argument_IdnBadPunycode, nameof(ascii));
204throw new ArgumentException(SR.Format(SR.Argument_InvalidCharSequence, unicode.Length - 1), nameof(unicode));
222throw new ArgumentException(SR.Argument_IdnBadLabelSize, nameof(unicode));
232throw new ArgumentException(SR.Format(SR.Argument_InvalidCharSequence, i), nameof(unicode));
244throw new ArgumentException(SR.Argument_IdnBadLabelSize, nameof(unicode));
248throw new ArgumentException(SR.Argument_IdnBadLabelSize, nameof(unicode));
268throw new ArgumentException(SR.Argument_IdnBadLabelSize, nameof(unicode));
272throw new ArgumentException(SR.Format(SR.Argument_IdnBadNameSize,
311throw new ArgumentException(SR.Argument_IdnBadLabelSize, nameof(unicode));
333throw new ArgumentException(SR.Argument_IdnBadLabelSize, nameof(unicode));
362throw new ArgumentException(SR.Argument_IdnBadBidi, nameof(unicode));
381throw new ArgumentException(SR.Argument_IdnBadBidi, nameof(unicode));
388throw new ArgumentException(SR.Argument_IdnBadBidi, nameof(unicode));
414throw new ArgumentException(SR.Argument_IdnBadPunycode, nameof(unicode));
499throw new ArgumentException(SR.Argument_IdnBadLabelSize, nameof(unicode));
511throw new ArgumentException(SR.Format(SR.Argument_IdnBadNameSize,
538throw new ArgumentException(SR.Format(SR.Argument_IdnBadStd3, c), nameof(c));
553throw new ArgumentException(SR.Argument_IdnIllegalName, nameof(ascii));
583throw new ArgumentException(SR.Argument_IdnBadLabelSize, nameof(ascii));
587throw new ArgumentException(SR.Format(SR.Argument_IdnBadNameSize,
610throw new ArgumentException(SR.Argument_IdnBadLabelSize, nameof(ascii));
618throw new ArgumentException(SR.Argument_IdnBadLabelSize, nameof(ascii));
638throw new ArgumentException(SR.Argument_IdnBadPunycode, nameof(ascii));
653throw new ArgumentException(SR.Argument_IdnBadPunycode, nameof(ascii));
688throw new ArgumentException(SR.Argument_IdnBadPunycode, nameof(ascii));
695throw new ArgumentException(SR.Argument_IdnBadPunycode, nameof(ascii));
703throw new ArgumentException(SR.Argument_IdnBadPunycode, nameof(ascii));
714throw new ArgumentException(SR.Argument_IdnBadPunycode, nameof(ascii));
720throw new ArgumentException(SR.Argument_IdnBadPunycode, nameof(ascii));
735throw new ArgumentException(SR.Argument_IdnBadPunycode, nameof(ascii));
779throw new ArgumentException(SR.Argument_IdnBadBidi, nameof(ascii));
786throw new ArgumentException(SR.Argument_IdnBadBidi, nameof(ascii));
792throw new ArgumentException(SR.Argument_IdnBadLabelSize, nameof(ascii));
804throw new ArgumentException(SR.Format(SR.Argument_IdnBadNameSize, c_defaultNameLimit - (IsDot(output[^1]) ? 0 : 1)), nameof(ascii));
827throw new ArgumentException(SR.Argument_IdnBadPunycode, nameof(cp));
src\libraries\System.Private.CoreLib\src\System\Globalization\JulianCalendar.cs (15)
56throw new ArgumentOutOfRangeException(nameof(era), era, SR.ArgumentOutOfRange_InvalidEraValue);
68SR.Format(SR.ArgumentOutOfRange_Range, 1, MaxYear));
94throw new ArgumentOutOfRangeException(null, SR.ArgumentOutOfRange_BadYearMonthDay);
106SR.Format(SR.ArgumentOutOfRange_Range, 1, monthDays));
187SR.Format(SR.ArgumentOutOfRange_Range, -120000, 120000));
311SR.Format(SR.ArgumentOutOfRange_Range, 0, TimeSpan.MillisecondsPerSecond - 1));
316throw new ArgumentOutOfRangeException(null, SR.ArgumentOutOfRange_BadHourMinuteSecond);
333SR.Format(SR.ArgumentOutOfRange_Range, 99, MaxYear));
348SR.Format(SR.ArgumentOutOfRange_Bounds_Lower_Upper, 1, MaxYear));
src\libraries\System.Private.CoreLib\src\System\Globalization\NumberFormatInfo.cs (13)
110throw new ArgumentException(SR.Argument_InvalidNativeDigitCount, propertyName);
117throw new ArgumentNullException(propertyName, SR.ArgumentNull_ArrayValue);
125throw new ArgumentException(SR.Argument_InvalidNativeDigitValue, propertyName);
130throw new ArgumentException(SR.Argument_InvalidNativeDigitValue, propertyName);
139throw new ArgumentException(SR.Argument_InvalidNativeDigitValue, propertyName);
155throw new ArgumentException(SR.Argument_InvalidDigitSubstitution, propertyName);
198throw new InvalidOperationException(SR.InvalidOperation_ReadOnly);
294throw new ArgumentException(SR.Argument_InvalidGroupSize, propName);
298throw new ArgumentException(SR.Argument_InvalidGroupSize, propName);
823(value & InvalidNumberStyles) != 0 ? SR.Argument_InvalidNumberStyles : SR.Arg_InvalidHexBinaryStyle,
837throw new ArgumentException((value & InvalidNumberStyles) != 0 ? SR.Argument_InvalidNumberStyles : SR.Arg_HexBinaryStylesNotSupported, nameof(style));
src\libraries\System.Private.CoreLib\src\System\Globalization\PersianCalendar.cs (20)
62throw new ArgumentOutOfRangeException(null, SR.ArgumentOutOfRange_BadYearMonthDay);
80SR.Format(SR.ArgumentOutOfRange_CalendarRange, s_minDate, s_maxDate));
88throw new ArgumentOutOfRangeException(nameof(era), era, SR.ArgumentOutOfRange_InvalidEraValue);
100SR.Format(SR.ArgumentOutOfRange_Range, 1, MaxCalendarYear));
114SR.Format(SR.ArgumentOutOfRange_Range, 1, MaxCalendarMonth));
188throw new InvalidOperationException(SR.InvalidOperation_DateTimeParsing);
226SR.Format(SR.ArgumentOutOfRange_Range, -120000, 120000));
338SR.Format(SR.ArgumentOutOfRange_Day, daysInMonth, month));
377SR.Format(SR.ArgumentOutOfRange_Day, daysInMonth, month));
384throw new ArgumentOutOfRangeException(null, SR.ArgumentOutOfRange_BadYearMonthDay);
411SR.Format(SR.ArgumentOutOfRange_Range, 99, MaxCalendarYear));
431SR.Format(SR.ArgumentOutOfRange_Range, 1, MaxCalendarYear));
src\libraries\System.Private.CoreLib\src\System\Globalization\RegionInfo.cs (12)
33throw new ArgumentException(SR.Argument_NoRegionInvariantCulture, nameof(name));
38throw new ArgumentException(SR.Format(SR.Argument_InvalidCultureName, name), nameof(name));
43throw new ArgumentException(SR.Format(SR.Argument_InvalidNeutralRegionName, name), nameof(name));
54throw new ArgumentException(SR.Argument_NoRegionInvariantCulture);
60throw new ArgumentException(SR.Format(SR.Argument_CultureIsNeutral, culture), nameof(culture));
66throw new ArgumentException(SR.Format(SR.Argument_CustomCultureCannotBePassedByNumber, culture), nameof(culture));
75throw new ArgumentException(SR.Format(SR.Argument_CultureIsNeutral, culture), nameof(culture));
src\libraries\System.Private.CoreLib\src\System\Globalization\UmAlQuraCalendar.cs (17)
300SR.Format(
302SR.ArgumentOutOfRange_CalendarRange,
312throw new ArgumentOutOfRangeException(nameof(era), era, SR.ArgumentOutOfRange_InvalidEraValue);
324SR.Format(SR.ArgumentOutOfRange_Range, MinCalendarYear, MaxCalendarYear));
407throw new InvalidOperationException(SR.InvalidOperation_DateTimeParsing);
417SR.Format(SR.ArgumentOutOfRange_Range, -120000, 120000));
546SR.Format(SR.ArgumentOutOfRange_Day, daysInMonth, month));
585SR.Format(SR.ArgumentOutOfRange_Day, daysInMonth, month));
591throw new ArgumentOutOfRangeException(null, SR.ArgumentOutOfRange_BadYearMonthDay);
617SR.Format(SR.ArgumentOutOfRange_Range, MinCalendarYear, MaxCalendarYear));
640SR.Format(SR.ArgumentOutOfRange_Range, MinCalendarYear, MaxCalendarYear));
src\libraries\System.Private.CoreLib\src\System\Guid.cs (18)
101throw new ArgumentException(SR.Format(SR.Arg_GuidArrayCtor, "16"), "b");
127throw new ArgumentException(SR.Format(SR.Arg_GuidArrayCtor, "8"), nameof(d));
225throw new OverflowException(SR.Overflow_UInt32);
230ParseFailure.Format_ExtraJunkAtEnd => SR.Format_ExtraJunkAtEnd,
231ParseFailure.Format_GuidBraceAfterLastNumber => SR.Format_GuidBraceAfterLastNumber,
232ParseFailure.Format_GuidBrace => SR.Format_GuidBrace,
233ParseFailure.Format_GuidComma => SR.Format_GuidComma,
234ParseFailure.Format_GuidDashes => SR.Format_GuidDashes,
235ParseFailure.Format_GuidEndBrace => SR.Format_GuidEndBrace,
236ParseFailure.Format_GuidHexPrefix => SR.Format_GuidHexPrefix,
237ParseFailure.Format_GuidInvalidChar => SR.Format_GuidInvalidChar,
238ParseFailure.Format_GuidInvLen => SR.Format_GuidInvLen,
239_ => SR.Format_GuidUnrecognized
398_ => throw new FormatException(SR.Format_InvalidGuidFormatSpecification),
1016throw new ArgumentException(SR.Arg_MustBeGuid, nameof(value));
1753throw new FormatException(SR.Format_InvalidGuidFormatSpecification);
src\libraries\System.Private.CoreLib\src\System\IO\FileSystem.Unix.cs (29)
59return new IOException(SR.Format(SR.Arg_FileIsDirectory_Name, path));
67throw new PlatformNotSupportedException(SR.PlatformNotSupported_FileEncryption);
72throw new PlatformNotSupportedException(SR.PlatformNotSupported_FileEncryption);
131throw new UnauthorizedAccessException(SR.Format(SR.IO_NotAFile, sourceFullPath));
140throw new UnauthorizedAccessException(SR.Format(SR.IO_NotAFile, destFullPath));
146throw new IOException(SR.Format(SR.IO_CannotReplaceSameFile, sourceFullPath, destFullPath));
409throw new IOException(SR.Format(SR.IO_PathNotFound_Path, sourceFullPath));
421throw new DirectoryNotFoundException(SR.Format(SR.IO_PathNotFound_Path, sourceFullPath));
434throw new IOException(SR.IO_SourceDestMustBeDifferent);
441throw new IOException(SR.Format(SR.IO_PathNotFound_Path, sourceFullPath));
445throw new IOException(SR.Format(SR.IO_AlreadyExists_Name, destFullPath));
455throw new IOException(SR.Format(SR.UnauthorizedAccess_IODenied_Path, sourceFullPath), errorInfo.RawErrno);
457throw new DirectoryNotFoundException(SR.Format(SR.IO_PathNotFound_Path, sourceFullPath));
459throw new IOException(SR.Format(SR.IO_PathNotFound_Path, sourceFullPath));
565throw new IOException(SR.Format(SR.UnauthorizedAccess_IODenied_Path, fullPath));
704throw new IOException(SR.Format(SR.IO_TooManySymbolicLinkLevels, linkPath));
src\libraries\System.Private.CoreLib\src\System\IO\UnmanagedMemoryAccessor.cs (28)
48throw new ArgumentException(SR.Argument_OffsetAndCapacityOutOfBounds);
57throw new InvalidOperationException(SR.InvalidOperation_CalledTwice);
69throw new ArgumentException(SR.Argument_UnmanagedMemAccessorWrapAround);
249throw new ArgumentException(SR.Arg_BadDecimal); // Throw same Exception type as Decimal(int[]) ctor for compat
287throw new ObjectDisposedException(nameof(UnmanagedMemoryAccessor), SR.ObjectDisposed_ViewAccessorClosed);
291throw new NotSupportedException(SR.NotSupported_Reading);
299throw new ArgumentOutOfRangeException(nameof(position), SR.ArgumentOutOfRange_PositionLessThanCapacityRequired);
303throw new ArgumentException(SR.Argument_NotEnoughBytesToRead, nameof(position));
321throw new ArgumentException(SR.Argument_InvalidOffLen);
325throw new ObjectDisposedException(nameof(UnmanagedMemoryAccessor), SR.ObjectDisposed_ViewAccessorClosed);
329throw new NotSupportedException(SR.NotSupported_Reading);
338throw new ArgumentOutOfRangeException(nameof(position), SR.ArgumentOutOfRange_PositionLessThanCapacityRequired);
515throw new ObjectDisposedException(nameof(UnmanagedMemoryAccessor), SR.ObjectDisposed_ViewAccessorClosed);
519throw new NotSupportedException(SR.NotSupported_Writing);
527throw new ArgumentOutOfRangeException(nameof(position), SR.ArgumentOutOfRange_PositionLessThanCapacityRequired);
531throw new ArgumentException(SR.Argument_NotEnoughBytesToWrite, nameof(position));
547throw new ArgumentException(SR.Argument_InvalidOffLen);
552throw new ArgumentOutOfRangeException(nameof(position), SR.ArgumentOutOfRange_PositionLessThanCapacityRequired);
557throw new ObjectDisposedException(nameof(UnmanagedMemoryAccessor), SR.ObjectDisposed_ViewAccessorClosed);
561throw new NotSupportedException(SR.NotSupported_Writing);
571throw new ObjectDisposedException(nameof(UnmanagedMemoryAccessor), SR.ObjectDisposed_ViewAccessorClosed);
575throw new NotSupportedException(SR.NotSupported_Reading);
582throw new ArgumentOutOfRangeException(nameof(position), SR.ArgumentOutOfRange_PositionLessThanCapacityRequired);
586throw new ArgumentException(SR.Argument_NotEnoughBytesToRead, nameof(position));
595throw new ObjectDisposedException(nameof(UnmanagedMemoryAccessor), SR.ObjectDisposed_ViewAccessorClosed);
599throw new NotSupportedException(SR.NotSupported_Writing);
606throw new ArgumentOutOfRangeException(nameof(position), SR.ArgumentOutOfRange_PositionLessThanCapacityRequired);
610throw new ArgumentException(SR.Argument_NotEnoughBytesToWrite, nameof(position));
src\libraries\System.Private.CoreLib\src\System\Reflection\Emit\TypeBuilder.cs (18)
90throw new ArgumentException(SR.Arg_EmptyArray, nameof(names));
128throw new ArgumentException(SR.Format(SR.Argument_MismatchedArrays, nameof(parameterTypeOptionalCustomModifiers), nameof(parameterTypes)));
131throw new ArgumentException(SR.Format(SR.Argument_MismatchedArrays, nameof(parameterTypeRequiredCustomModifiers), nameof(parameterTypes)));
331throw new ArgumentException(SR.Argument_MustBeTypeBuilder, nameof(type));
343throw new ArgumentException(SR.Argument_NeedGenericMethodDefinition, nameof(method));
348throw new ArgumentException(SR.Argument_MethodNeedGenericDeclaringType, nameof(method));
353throw new ArgumentException(SR.Argument_InvalidMethodDeclaringType, nameof(type));
366throw new ArgumentException(SR.Argument_NeedNonGenericType, nameof(type));
378throw new ArgumentException(SR.Argument_MustBeTypeBuilder, nameof(type));
383throw new ArgumentException(SR.Argument_ConstructorNeedGenericDeclaringType, nameof(constructor));
388throw new ArgumentException(SR.Argument_InvalidConstructorDeclaringType, nameof(type));
399throw new ArgumentException(SR.Argument_NeedNonGenericType, nameof(type));
411throw new ArgumentException(SR.Argument_MustBeTypeBuilder, nameof(type));
416throw new ArgumentException(SR.Argument_FieldNeedGenericDeclaringType, nameof(field));
421throw new ArgumentException(SR.Argument_InvalidFieldDeclaringType, nameof(type));
432throw new ArgumentException(SR.Argument_NeedNonGenericType, nameof(type));
src\libraries\System.Private.CoreLib\src\System\Reflection\SignatureType.cs (62)
54public sealed override Type MakeGenericType(params Type[] typeArguments) => throw new NotSupportedException(SR.NotSupported_SignatureType); // There is no SignatureType for type definition types so it would never be legal to call this.
81public sealed override Assembly Assembly => throw new NotSupportedException(SR.NotSupported_SignatureType);
82public sealed override Module Module => throw new NotSupportedException(SR.NotSupported_SignatureType);
84public sealed override Type ReflectedType => throw new NotSupportedException(SR.NotSupported_SignatureType);
85public sealed override Type BaseType => throw new NotSupportedException(SR.NotSupported_SignatureType);
88public sealed override Type[] GetInterfaces() => throw new NotSupportedException(SR.NotSupported_SignatureType);
89public sealed override bool IsAssignableFrom([NotNullWhen(true)] Type? c) => throw new NotSupportedException(SR.NotSupported_SignatureType);
90public sealed override int MetadataToken => throw new NotSupportedException(SR.NotSupported_SignatureType);
91public sealed override bool HasSameMetadataDefinitionAs(MemberInfo other) => throw new NotSupportedException(SR.NotSupported_SignatureType);
93public sealed override Type DeclaringType => throw new NotSupportedException(SR.NotSupported_SignatureType);
94public sealed override MethodBase DeclaringMethod => throw new NotSupportedException(SR.NotSupported_SignatureType);
96public sealed override Type[] GetGenericParameterConstraints() => throw new NotSupportedException(SR.NotSupported_SignatureType);
97public sealed override GenericParameterAttributes GenericParameterAttributes => throw new NotSupportedException(SR.NotSupported_SignatureType);
98public sealed override bool IsEnumDefined(object value) => throw new NotSupportedException(SR.NotSupported_SignatureType);
99public sealed override string GetEnumName(object value) => throw new NotSupportedException(SR.NotSupported_SignatureType);
100public sealed override string[] GetEnumNames() => throw new NotSupportedException(SR.NotSupported_SignatureType);
101public sealed override Type GetEnumUnderlyingType() => throw new NotSupportedException(SR.NotSupported_SignatureType);
103public sealed override Array GetEnumValues() => throw new NotSupportedException(SR.NotSupported_SignatureType);
104public sealed override Guid GUID => throw new NotSupportedException(SR.NotSupported_SignatureType);
105protected sealed override TypeCode GetTypeCodeImpl() => throw new NotSupportedException(SR.NotSupported_SignatureType);
106protected sealed override TypeAttributes GetAttributeFlagsImpl() => throw new NotSupportedException(SR.NotSupported_SignatureType);
109public sealed override ConstructorInfo[] GetConstructors(BindingFlags bindingAttr) => throw new NotSupportedException(SR.NotSupported_SignatureType);
112public sealed override EventInfo GetEvent(string name, BindingFlags bindingAttr) => throw new NotSupportedException(SR.NotSupported_SignatureType);
115public sealed override EventInfo[] GetEvents(BindingFlags bindingAttr) => throw new NotSupportedException(SR.NotSupported_SignatureType);
118public sealed override FieldInfo GetField(string name, BindingFlags bindingAttr) => throw new NotSupportedException(SR.NotSupported_SignatureType);
121public sealed override FieldInfo[] GetFields(BindingFlags bindingAttr) => throw new NotSupportedException(SR.NotSupported_SignatureType);
124public sealed override MemberInfo[] GetMembers(BindingFlags bindingAttr) => throw new NotSupportedException(SR.NotSupported_SignatureType);
127public sealed override MethodInfo[] GetMethods(BindingFlags bindingAttr) => throw new NotSupportedException(SR.NotSupported_SignatureType);
130public sealed override Type GetNestedType(string name, BindingFlags bindingAttr) => throw new NotSupportedException(SR.NotSupported_SignatureType);
133public sealed override Type[] GetNestedTypes(BindingFlags bindingAttr) => throw new NotSupportedException(SR.NotSupported_SignatureType);
136public sealed override PropertyInfo[] GetProperties(BindingFlags bindingAttr) => throw new NotSupportedException(SR.NotSupported_SignatureType);
139public sealed override object InvokeMember(string name, BindingFlags invokeAttr, Binder? binder, object? target, object?[]? args, ParameterModifier[]? modifiers, CultureInfo? culture, string[]? namedParameters) => throw new NotSupportedException(SR.NotSupported_SignatureType);
142protected sealed override MethodInfo GetMethodImpl(string name, BindingFlags bindingAttr, Binder? binder, CallingConventions callConvention, Type[]? types, ParameterModifier[]? modifiers) => throw new NotSupportedException(SR.NotSupported_SignatureType);
145protected sealed override MethodInfo GetMethodImpl(string name, int genericParameterCount, BindingFlags bindingAttr, Binder? binder, CallingConventions callConvention, Type[]? types, ParameterModifier[]? modifiers) => throw new NotSupportedException(SR.NotSupported_SignatureType);
148protected sealed override PropertyInfo GetPropertyImpl(string name, BindingFlags bindingAttr, Binder? binder, Type? returnType, Type[]? types, ParameterModifier[]? modifiers) => throw new NotSupportedException(SR.NotSupported_SignatureType);
151public sealed override MemberInfo[] FindMembers(MemberTypes memberType, BindingFlags bindingAttr, MemberFilter? filter, object? filterCriteria) => throw new NotSupportedException(SR.NotSupported_SignatureType);
154public sealed override MemberInfo[] GetMember(string name, BindingFlags bindingAttr) => throw new NotSupportedException(SR.NotSupported_SignatureType);
157public sealed override MemberInfo[] GetMember(string name, MemberTypes type, BindingFlags bindingAttr) => throw new NotSupportedException(SR.NotSupported_SignatureType);
166public sealed override MemberInfo[] GetDefaultMembers() => throw new NotSupportedException(SR.NotSupported_SignatureType);
169public sealed override EventInfo[] GetEvents() => throw new NotSupportedException(SR.NotSupported_SignatureType);
171public sealed override object[] GetCustomAttributes(bool inherit) => throw new NotSupportedException(SR.NotSupported_SignatureType);
172public sealed override object[] GetCustomAttributes(Type attributeType, bool inherit) => throw new NotSupportedException(SR.NotSupported_SignatureType);
173public sealed override bool IsDefined(Type attributeType, bool inherit) => throw new NotSupportedException(SR.NotSupported_SignatureType);
174public sealed override IList<CustomAttributeData> GetCustomAttributesData() => throw new NotSupportedException(SR.NotSupported_SignatureType);
178public sealed override Type GetInterface(string name, bool ignoreCase) => throw new NotSupportedException(SR.NotSupported_SignatureType);
181protected sealed override ConstructorInfo GetConstructorImpl(BindingFlags bindingAttr, Binder? binder, CallingConventions callConvention, Type[] types, ParameterModifier[]? modifiers) => throw new NotSupportedException(SR.NotSupported_SignatureType);
183protected sealed override bool IsCOMObjectImpl() => throw new NotSupportedException(SR.NotSupported_SignatureType);
184protected sealed override bool IsPrimitiveImpl() => throw new NotSupportedException(SR.NotSupported_SignatureType);
185public sealed override IEnumerable<CustomAttributeData> CustomAttributes => throw new NotSupportedException(SR.NotSupported_SignatureType);
188public sealed override Type[] FindInterfaces(TypeFilter filter, object? filterCriteria) => throw new NotSupportedException(SR.NotSupported_SignatureType);
189public sealed override InterfaceMapping GetInterfaceMap([DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.PublicMethods | DynamicallyAccessedMemberTypes.NonPublicMethods)] Type interfaceType) => throw new NotSupportedException(SR.NotSupported_SignatureType);
190protected sealed override bool IsContextfulImpl() => throw new NotSupportedException(SR.NotSupported_SignatureType);
192public sealed override bool IsEquivalentTo([NotNullWhen(true)] Type? other) => throw new NotSupportedException(SR.NotSupported_SignatureType);
193public sealed override bool IsInstanceOfType([NotNullWhen(true)] object? o) => throw new NotSupportedException(SR.NotSupported_SignatureType);
194protected sealed override bool IsMarshalByRefImpl() => throw new NotSupportedException(SR.NotSupported_SignatureType);
195public sealed override bool IsSecurityCritical => throw new NotSupportedException(SR.NotSupported_SignatureType);
196public sealed override bool IsSecuritySafeCritical => throw new NotSupportedException(SR.NotSupported_SignatureType);
197public sealed override bool IsSecurityTransparent => throw new NotSupportedException(SR.NotSupported_SignatureType);
199public sealed override bool IsSerializable => throw new NotSupportedException(SR.NotSupported_SignatureType);
200public sealed override bool IsSubclassOf(Type c) => throw new NotSupportedException(SR.NotSupported_SignatureType);
203public sealed override StructLayoutAttribute StructLayoutAttribute => throw new NotSupportedException(SR.NotSupported_SignatureType);
205public sealed override RuntimeTypeHandle TypeHandle => throw new NotSupportedException(SR.NotSupported_SignatureType);
src\libraries\System.Private.CoreLib\src\System\Resources\ManifestBasedResourceGroveler.cs (15)
140throw new ArgumentException(SR.Format(SR.Arg_InvalidNeutralResourcesLanguage_FallbackLoc, fallbackLocation));
158throw new ArgumentException(SR.Format(SR.Arg_InvalidNeutralResourcesLanguage_Asm_Culture, a, attr.CultureName), e);
209throw new NotSupportedException(SR.Format(SR.NotSupported_ObsoleteResourcesFile, _mediator.MainAssembly.GetName().Name));
233throw new NotSupportedException(SR.ResourceManager_ReflectionNotAllowed);
265throw new InvalidOperationException(SR.Format(SR.InvalidOperation_ResMgrBadResSet_Type, _mediator.UserResourceSet.AssemblyQualifiedName), 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);
475SR.Format(SR.MissingManifestResource_NoNeutralAsm,
src\libraries\System.Private.CoreLib\src\System\Resources\ResourceReader.cs (68)
129throw new ArgumentException(SR.Argument_StreamNotReadable);
188throw new BadImageFormatException(SR.BadImageFormat_NegativeStringLength);
226throw new FormatException(SR.Format(SR.BadImageFormat_ResourcesNameInvalidOffset, r));
239throw new InvalidOperationException(SR.ResourceReaderIsClosed);
322throw new FormatException(SR.Format(SR.BadImageFormat_ResourcesDataInvalidOffset, dataPos));
343throw new BadImageFormatException(SR.BadImageFormat_NegativeStringLength);
352throw new BadImageFormatException(SR.BadImageFormat_ResourcesNameTooLong);
368throw new BadImageFormatException(SR.BadImageFormat_ResourceNameCorrupted);
391throw new BadImageFormatException(SR.BadImageFormat_NegativeStringLength);
397throw new BadImageFormatException(SR.Format(SR.BadImageFormat_ResourcesIndexTooLong, index));
420throw new FormatException(SR.Format(SR.BadImageFormat_ResourcesDataInvalidOffset, dataOffset));
434throw new EndOfStreamException(SR.Format(SR.BadImageFormat_ResourceNameCorrupted_NameIndex, index));
440throw new FormatException(SR.Format(SR.BadImageFormat_ResourcesDataInvalidOffset, dataOffset));
461throw new FormatException(SR.Format(SR.BadImageFormat_ResourcesDataInvalidOffset, dataPos));
487throw new InvalidOperationException(SR.Format(SR.InvalidOperation_ResourceNotString_Type, FindType(typeIndex).FullName));
500throw new InvalidOperationException(SR.Format(SR.InvalidOperation_ResourceNotString_Type, typeString));
549throw new BadImageFormatException(SR.BadImageFormat_TypeMismatch, eof);
553throw new BadImageFormatException(SR.BadImageFormat_TypeMismatch, e);
631throw new BadImageFormatException(SR.BadImageFormat_TypeMismatch, eof);
635throw new BadImageFormatException(SR.BadImageFormat_TypeMismatch, e);
708throw new BadImageFormatException(SR.Format(SR.BadImageFormat_ResourceDataLengthInvalid, len));
715throw new BadImageFormatException(SR.Format(SR.BadImageFormat_ResourceDataLengthInvalid, len));
722throw new BadImageFormatException(SR.Format(SR.BadImageFormat_ResourceDataLengthInvalid, len));
736throw new BadImageFormatException(SR.Format(SR.BadImageFormat_ResourceDataLengthInvalid, len));
748throw new BadImageFormatException(SR.Format(SR.BadImageFormat_ResourceDataLengthInvalid, len));
762throw new BadImageFormatException(SR.BadImageFormat_TypeMismatch);
790throw new BadImageFormatException(SR.BadImageFormat_ResourcesHeaderCorrupted, eof);
794throw new BadImageFormatException(SR.BadImageFormat_ResourcesHeaderCorrupted, e);
808throw new ArgumentException(SR.Resources_StreamNotValid);
817throw new BadImageFormatException(SR.BadImageFormat_ResourcesHeaderCorrupted);
832throw new NotSupportedException(SR.Format(SR.NotSupported_WrongResourceReader_Type, readerType));
846throw new ArgumentException(SR.Format(SR.Arg_ResourceFileUnsupportedVersion, CurrentVersion, version));
852throw new BadImageFormatException(SR.BadImageFormat_ResourcesHeaderCorrupted);
860throw new BadImageFormatException(SR.BadImageFormat_ResourcesHeaderCorrupted);
902throw new BadImageFormatException(SR.BadImageFormat_ResourcesHeaderCorrupted);
923throw new BadImageFormatException(SR.BadImageFormat_ResourcesHeaderCorrupted);
934throw new BadImageFormatException(SR.BadImageFormat_ResourcesHeaderCorrupted);
950throw new BadImageFormatException(SR.BadImageFormat_ResourcesHeaderCorrupted);
959throw new BadImageFormatException(SR.BadImageFormat_ResourcesHeaderCorrupted);
970throw new NotSupportedException(SR.ResourceManager_ReflectionNotAllowed);
975throw new BadImageFormatException(SR.BadImageFormat_InvalidType);
1019throw new NotSupportedException(SR.NotSupported_ResourceObjectSerialization, fileNotFoundException);
1089if (_currentName == ENUM_DONE) throw new InvalidOperationException(SR.InvalidOperation_EnumEnded);
1090if (!_currentIsValid) throw new InvalidOperationException(SR.InvalidOperation_EnumNotStarted);
1091if (_reader._resCache == null) throw new InvalidOperationException(SR.ResourceReaderIsClosed);
1106if (_currentName == ENUM_DONE) throw new InvalidOperationException(SR.InvalidOperation_EnumEnded);
1107if (!_currentIsValid) throw new InvalidOperationException(SR.InvalidOperation_EnumNotStarted);
1108if (_reader._resCache == null) throw new InvalidOperationException(SR.ResourceReaderIsClosed);
1143if (_currentName == ENUM_DONE) throw new InvalidOperationException(SR.InvalidOperation_EnumEnded);
1144if (!_currentIsValid) throw new InvalidOperationException(SR.InvalidOperation_EnumNotStarted);
1145if (_reader._resCache == null) throw new InvalidOperationException(SR.ResourceReaderIsClosed);
1157if (_reader._resCache == null) throw new InvalidOperationException(SR.ResourceReaderIsClosed);
src\libraries\System.Private.CoreLib\src\System\Runtime\InteropServices\Marshal.cs (14)
112throw new ArgumentException(SR.Argument_MustBeRuntimeType, nameof(t));
116throw new ArgumentException(SR.Argument_NeedNonGenericType, nameof(t));
127throw new ArgumentException(SR.Argument_NeedNonGenericType, nameof(T));
569throw new ArgumentException(SR.Argument_NeedNonGenericType, nameof(structureType));
573throw new ArgumentException(SR.Argument_MustBeRuntimeType, nameof(structureType));
617throw new ArgumentException(SR.Argument_NeedNonGenericType, nameof(T));
1055throw new ArgumentException(SR.Argument_MustBeRuntimeType, nameof(type));
1073throw new ArgumentException(SR.Argument_TypeMustNotBeComImport, nameof(type));
1077throw new ArgumentException(SR.Argument_NeedNonGenericType, nameof(type));
1099throw new ArgumentException(SR.Argument_MustBeRuntimeType, nameof(t));
1103throw new ArgumentException(SR.Argument_NeedNonGenericType, nameof(t));
1111throw new ArgumentException(SR.Arg_MustBeDelegate, nameof(t));
1124throw new ArgumentException(SR.Argument_NeedNonGenericType, nameof(TDelegate));
1132throw new ArgumentException(SR.Arg_MustBeDelegate, nameof(TDelegate));
src\libraries\System.Private.CoreLib\src\System\Runtime\InteropServices\Marshalling\ComVariant.cs (11)
154throw new PlatformNotSupportedException(SR.ComVariant_SafeArray_PlatformNotSupported);
360throw new ArgumentException(SR.UnsupportedType, nameof(T));
387throw new ArgumentException(SR.ComVariant_VT_DECIMAL_NotSupported_CreateRaw, nameof(vt));
391throw new ArgumentException(SR.ComVariant_VT_VARIANT_In_Variant, nameof(vt));
395throw new PlatformNotSupportedException(SR.ComVariant_SafeArray_PlatformNotSupported);
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)));
553throw new ArgumentException(SR.UnsupportedType, nameof(T));
579throw new ArgumentException(SR.ComVariant_VT_DECIMAL_NotSupported_RawDataRef, nameof(T));
src\libraries\System.Private.CoreLib\src\System\Runtime\Versioning\VersioningHelper.cs (11)
37throw new ArgumentException(SR.Format(SR.Argument_ResourceScopeWrongDirection, fromResType, toResType), nameof(from));
42throw new ArgumentNullException(nameof(type), SR.ArgumentNull_TypeRequiredByResourceScope);
112throw new ArgumentException(SR.Format(SR.Argument_BadResourceScopeTypeBits, consumeAsScope), nameof(consumeAsScope));
126throw new ArgumentException(SR.Format(SR.Argument_BadResourceScopeTypeBits, calleeScope), nameof(calleeScope));
147throw new ArgumentException(SR.Format(SR.Argument_BadResourceScopeVisibilityBits, consumeAsScope), nameof(consumeAsScope));
161throw new ArgumentException(SR.Format(SR.Argument_BadResourceScopeVisibilityBits, calleeScope), nameof(calleeScope));
src\libraries\System.Private.CoreLib\src\System\RuntimeType.cs (36)
46throw new ArgumentException(SR.Argument_HasToBeArrayClass);
63throw new ArgumentException(SR.Arg_MustBeType, nameof(attributeType));
105throw new ArgumentException(SR.Arg_MustBeEnumBaseTypeOrEnum, nameof(value));
114throw new ArgumentException(SR.Arg_MustBeEnum, "enumType");
196throw new ArgumentException(SR.Arg_MustBeType, nameof(attributeType));
214throw new ArgumentException(SR.Format(SR.Arg_EnumAndObjectMustBeSameType, valueType, this));
225throw new InvalidOperationException(SR.InvalidOperation_UnknownEnumType);
229throw new ArgumentException(SR.Format(SR.Arg_EnumUnderlyingTypeAndObjectMustBeSameType, valueType, underlyingType));
247throw new InvalidOperationException(SR.InvalidOperation_UnknownEnumType),
315throw new InvalidOperationException(SR.Arg_GenericParameter);
319throw new ArgumentException(SR.Arg_NoAccessSpec, nameof(bindingFlags));
336throw new ArgumentException(SR.Arg_NamedParamTooBig, nameof(namedParams));
341throw new ArgumentException(SR.Arg_NamedParamTooBig, nameof(namedParams));
394throw new ArgumentException(SR.Arg_NamedParamNull, nameof(namedParams));
405throw new ArgumentException(SR.Arg_CreatInstAccess, nameof(bindingFlags));
430throw new ArgumentException(SR.Arg_FldSetGet, nameof(bindingFlags));
433throw new ArgumentException(SR.Arg_FldGetPropSet, nameof(bindingFlags));
442throw new ArgumentException(SR.Arg_FldSetPropGet, nameof(bindingFlags));
445throw new ArgumentException(SR.Arg_FldSetInvoke, nameof(bindingFlags));
496throw new ArgumentException(SR.Arg_IndexMustBeInt);
519throw new ArgumentException(SR.Arg_FldGetArgErr, nameof(bindingFlags));
526throw new ArgumentException(SR.Arg_FldSetArgErr, nameof(bindingFlags));
548throw new ArgumentException(SR.Arg_PropSetGet, nameof(bindingFlags));
557throw new ArgumentException(SR.Arg_PropSetInvoke, nameof(bindingFlags));
740SR.Format(SR.Argument_NeverValidGenericArgument, type));
755SR.Format(SR.Argument_NotEnoughGenArguments, genericArguments.Length, genericParameters.Length));
822throw new ArgumentException(SR.Format(SR.Arg_ObjObjEx, value?.GetType(), this));
824throw new NotSupportedException(SR.NotSupported_ByRefLike);
893throw new ArgumentException(SR.Format(SR.Arg_ObjObjEx, value?.GetType(), this));
895throw new NotSupportedException(SR.NotSupported_ByRefLike);
src\libraries\System.Private.CoreLib\src\System\Text\EncoderExceptionFallback.cs (13)
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);
81: base(SR.Arg_ArgumentException)
111SR.Format(SR.ArgumentOutOfRange_Range, 0xD800, 0xDBFF));
116SR.Format(SR.ArgumentOutOfRange_Range, 0xDC00, 0xDFFF));
src\libraries\System.Private.CoreLib\src\System\Text\Encoding.cs (19)
222throw new ArgumentException(SR.Format(SR.Argument_CodepageNotSupported, codepage), nameof(codepage));
240string exceptionMessage = SR.Format(SR.Encoding_UTF7_Disabled, moreInfoUrl);
249nameof(codepage), SR.Format(SR.ArgumentOutOfRange_Range, 0, 65535));
252throw new NotSupportedException(SR.Format(SR.NotSupported_NoCodepageData, codepage));
334throw new NotSupportedException(SR.Format(SR.NotSupported_NoCodepageData, _codePage));
477throw new InvalidOperationException(SR.InvalidOperation_ReadOnly);
491throw new InvalidOperationException(SR.InvalidOperation_ReadOnly);
1099SR.Format(SR.Argument_EncodingConversionOverflowBytes, _codePage, EncoderFallback.GetType()), "bytes");
1119throw new ArgumentException(SR.Argument_ConversionOverflow);
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\StringBuilder.cs (36)
127throw new ArgumentOutOfRangeException(nameof(length), SR.ArgumentOutOfRange_IndexLength);
152throw new ArgumentOutOfRangeException(nameof(capacity), SR.ArgumentOutOfRange_Capacity);
201throw new SerializationException(SR.Serialization_StringBuilderMaxCapacity);
212throw new SerializationException(SR.Serialization_StringBuilderCapacity);
272throw new ArgumentOutOfRangeException(nameof(value), SR.ArgumentOutOfRange_Capacity);
276throw new ArgumentOutOfRangeException(nameof(value), SR.ArgumentOutOfRange_SmallCapacity);
336throw new ArgumentOutOfRangeException(nameof(chunkLength), SR.ArgumentOutOfRange_IndexMustBeLessOrEqual);
362throw new ArgumentOutOfRangeException(nameof(startIndex), SR.ArgumentOutOfRange_StartIndexLargerThanLength);
367throw new ArgumentOutOfRangeException(nameof(length), SR.ArgumentOutOfRange_IndexLength);
395throw new ArgumentOutOfRangeException(nameof(value), SR.ArgumentOutOfRange_SmallCapacity);
479throw new ArgumentOutOfRangeException(nameof(index), SR.ArgumentOutOfRange_IndexMustBeLess);
487throw new ArgumentOutOfRangeException(nameof(index), SR.ArgumentOutOfRange_IndexMustBeLess);
689throw new ArgumentOutOfRangeException(nameof(repeatCount), SR.ArgumentOutOfRange_LengthGreaterThanCapacity);
735throw new ArgumentOutOfRangeException(nameof(charCount), SR.ArgumentOutOfRange_IndexMustBeLessOrEqual);
784throw new ArgumentOutOfRangeException(nameof(startIndex), SR.ArgumentOutOfRange_IndexMustBeLessOrEqual);
823throw new ArgumentOutOfRangeException(nameof(startIndex), SR.ArgumentOutOfRange_IndexMustBeLessOrEqual);
840throw new ArgumentOutOfRangeException(nameof(Capacity), SR.ArgumentOutOfRange_Capacity);
878throw new ArgumentException(SR.ArgumentOutOfRange_OffsetOut);
890throw new ArgumentOutOfRangeException(nameof(sourceIndex), SR.ArgumentOutOfRange_IndexMustBeLessOrEqual);
895throw new ArgumentException(SR.Arg_LongerThanSrcString);
942throw new ArgumentOutOfRangeException(nameof(index), SR.ArgumentOutOfRange_IndexMustBeLessOrEqual);
982throw new ArgumentOutOfRangeException(nameof(length), SR.ArgumentOutOfRange_IndexMustBeLessOrEqual);
1296throw new ArgumentOutOfRangeException(nameof(index), SR.ArgumentOutOfRange_IndexMustBeLessOrEqual);
1323throw new ArgumentOutOfRangeException(nameof(index), SR.ArgumentOutOfRange_IndexMustBeLessOrEqual);
1334throw new ArgumentOutOfRangeException(nameof(index), SR.ArgumentOutOfRange_IndexMustBeLessOrEqual);
1349throw new ArgumentOutOfRangeException(nameof(index), SR.ArgumentOutOfRange_IndexMustBeLessOrEqual);
1365throw new ArgumentOutOfRangeException(nameof(startIndex), SR.ArgumentOutOfRange_IndexMustBeLessOrEqual);
1401throw new ArgumentOutOfRangeException(nameof(index), SR.ArgumentOutOfRange_IndexMustBeLessOrEqual);
2085throw new ArgumentOutOfRangeException(nameof(startIndex), SR.ArgumentOutOfRange_IndexMustBeLessOrEqual);
2089throw new ArgumentOutOfRangeException(nameof(count), SR.ArgumentOutOfRange_IndexMustBeLessOrEqual);
2093throw new ArgumentException(SR.Arg_EmptySpan, nameof(oldValue));
2214throw new ArgumentOutOfRangeException(nameof(startIndex), SR.ArgumentOutOfRange_IndexMustBeLessOrEqual);
2219throw new ArgumentOutOfRangeException(nameof(count), SR.ArgumentOutOfRange_IndexMustBeLessOrEqual);
2307throw new ArgumentOutOfRangeException(nameof(valueCount), SR.ArgumentOutOfRange_LengthGreaterThanCapacity);
2555throw new ArgumentOutOfRangeException("requiredLength", SR.ArgumentOutOfRange_SmallCapacity);
2644throw new ArgumentOutOfRangeException("requiredLength", SR.ArgumentOutOfRange_SmallCapacity);
src\libraries\System.Private.CoreLib\src\System\Text\UnicodeEncoding.cs (20)
93throw new ArgumentOutOfRangeException(nameof(chars), SR.ArgumentOutOfRange_IndexCountBuffer);
150throw new ArgumentOutOfRangeException(nameof(s), SR.ArgumentOutOfRange_IndexCount);
153throw new ArgumentOutOfRangeException(nameof(byteIndex), SR.ArgumentOutOfRange_IndexMustBeLessOrEqual);
188throw new ArgumentOutOfRangeException(nameof(chars), SR.ArgumentOutOfRange_IndexCountBuffer);
191throw new ArgumentOutOfRangeException(nameof(byteIndex), SR.ArgumentOutOfRange_IndexMustBeLessOrEqual);
240throw new ArgumentOutOfRangeException(nameof(bytes), SR.ArgumentOutOfRange_IndexCountBuffer);
280throw new ArgumentOutOfRangeException(nameof(bytes), SR.ArgumentOutOfRange_IndexCountBuffer);
283throw new ArgumentOutOfRangeException(nameof(charIndex), SR.ArgumentOutOfRange_IndexMustBeLessOrEqual);
332throw new ArgumentOutOfRangeException(nameof(bytes), SR.ArgumentOutOfRange_IndexCountBuffer);
357throw new ArgumentOutOfRangeException(nameof(count), SR.ArgumentOutOfRange_GetByteCountOverflow);
382throw new ArgumentException(SR.Format(SR.Argument_EncoderFallbackNotEmpty, this.EncodingName, encoder.Fallback?.GetType()));
600SR.Format(SR.Argument_RecursiveFallback, charLeftOver), nameof(chars));
665throw new ArgumentException(SR.Format(SR.Argument_EncoderFallbackNotEmpty, this.EncodingName, encoder.Fallback?.GetType()));
938SR.Format(SR.Argument_RecursiveFallback, charLeftOver), nameof(chars));
1759throw new ArgumentOutOfRangeException(nameof(charCount), SR.ArgumentOutOfRange_GetByteCountOverflow);
1779throw new ArgumentOutOfRangeException(nameof(byteCount), SR.ArgumentOutOfRange_GetCharCountOverflow);
src\libraries\System.Private.CoreLib\src\System\Text\UTF32Encoding.cs (17)
101throw new ArgumentOutOfRangeException(nameof(chars), SR.ArgumentOutOfRange_IndexCountBuffer);
158throw new ArgumentOutOfRangeException(nameof(s), SR.ArgumentOutOfRange_IndexCount);
161throw new ArgumentOutOfRangeException(nameof(byteIndex), SR.ArgumentOutOfRange_IndexMustBeLessOrEqual);
196throw new ArgumentOutOfRangeException(nameof(chars), SR.ArgumentOutOfRange_IndexCountBuffer);
199throw new ArgumentOutOfRangeException(nameof(byteIndex), SR.ArgumentOutOfRange_IndexMustBeLessOrEqual);
248throw new ArgumentOutOfRangeException(nameof(bytes), SR.ArgumentOutOfRange_IndexCountBuffer);
288throw new ArgumentOutOfRangeException(nameof(bytes), SR.ArgumentOutOfRange_IndexCountBuffer);
291throw new ArgumentOutOfRangeException(nameof(charIndex), SR.ArgumentOutOfRange_IndexMustBeLessOrEqual);
340throw new ArgumentOutOfRangeException(nameof(bytes), SR.ArgumentOutOfRange_IndexCountBuffer);
375throw new ArgumentException(SR.Format(SR.Argument_EncoderFallbackNotEmpty, this.EncodingName, encoder.Fallback?.GetType().ToString() ?? string.Empty));
473throw new ArgumentOutOfRangeException(nameof(count), SR.ArgumentOutOfRange_GetByteCountOverflow);
510throw new ArgumentException(SR.Format(SR.Argument_EncoderFallbackNotEmpty, this.EncodingName, encoder.Fallback?.GetType()));
817throw new ArgumentOutOfRangeException(nameof(count), SR.ArgumentOutOfRange_GetByteCountOverflow);
1082throw new ArgumentOutOfRangeException(nameof(charCount), SR.ArgumentOutOfRange_GetByteCountOverflow);
1108throw new ArgumentOutOfRangeException(nameof(byteCount), SR.ArgumentOutOfRange_GetCharCountOverflow);
src\libraries\System.Private.CoreLib\src\System\Text\UTF7Encoding.cs (11)
137throw new ArgumentOutOfRangeException(nameof(chars), SR.ArgumentOutOfRange_IndexCountBuffer);
194throw new ArgumentOutOfRangeException(nameof(s), SR.ArgumentOutOfRange_IndexCount);
197throw new ArgumentOutOfRangeException(nameof(byteIndex), SR.ArgumentOutOfRange_IndexMustBeLessOrEqual);
232throw new ArgumentOutOfRangeException(nameof(chars), SR.ArgumentOutOfRange_IndexCountBuffer);
235throw new ArgumentOutOfRangeException(nameof(byteIndex), SR.ArgumentOutOfRange_IndexMustBeLessOrEqual);
284throw new ArgumentOutOfRangeException(nameof(bytes), SR.ArgumentOutOfRange_IndexCountBuffer);
324throw new ArgumentOutOfRangeException(nameof(bytes), SR.ArgumentOutOfRange_IndexCountBuffer);
327throw new ArgumentOutOfRangeException(nameof(charIndex), SR.ArgumentOutOfRange_IndexMustBeLessOrEqual);
376throw new ArgumentOutOfRangeException(nameof(bytes), SR.ArgumentOutOfRange_IndexCountBuffer);
748throw new ArgumentOutOfRangeException(nameof(charCount), SR.ArgumentOutOfRange_GetByteCountOverflow);
905throw new ArgumentException(SR.Argument_InvalidCharSequenceNoIndex);
src\libraries\System.Private.CoreLib\src\System\Threading\SemaphoreSlim.cs (8)
152nameof(initialCount), initialCount, SR.SemaphoreSlim_ctor_InitialCountWrong);
158throw new ArgumentOutOfRangeException(nameof(maxCount), maxCount, SR.SemaphoreSlim_ctor_MaxCountWrong);
227nameof(timeout), timeout, SR.SemaphoreSlim_Wait_TimeoutWrong);
261nameof(timeout), timeout, SR.SemaphoreSlim_Wait_TimeoutWrong);
313nameof(millisecondsTimeout), millisecondsTimeout, SR.SemaphoreSlim_Wait_TimeoutWrong);
594nameof(timeout), timeout, SR.SemaphoreSlim_Wait_TimeoutWrong);
626nameof(millisecondsTimeout), millisecondsTimeout, SR.SemaphoreSlim_Wait_TimeoutWrong);
789nameof(releaseCount), releaseCount, SR.SemaphoreSlim_Release_CountWrong);
src\libraries\System.Private.CoreLib\src\System\ThrowHelper.cs (162)
83throw new ArgumentException(SR.Format(SR.Argument_InvalidTypeWithPointersNotSupported, targetType));
101throw new ArgumentException(SR.Argument_DestinationTooShort, "destination");
107throw new ArgumentException(SR.Argument_InvalidTimeSpanStyles, "styles");
113throw new ArgumentException(SR.Format(SR.Argument_InvalidEnumValue, value, typeof(TEnum).Name), argumentName);
119throw new ArgumentException(SR.Argument_OverlapAlignmentMismatch);
125throw new ArgumentNullException("value", SR.ArgumentNull_TypedRefType);
137throw new ArgumentException(SR.Format(SR.ArgumentException_ValueTupleIncorrectType, obj.GetType()), "other");
157throw new ArgumentException(SR.Format(SR.Arg_BogusIComparer, comparer));
212throw new ArgumentOutOfRangeException(nameof(month), month, SR.ArgumentOutOfRange_Month);
218throw new ArgumentOutOfRangeException(nameof(dayNumber), dayNumber, SR.ArgumentOutOfRange_DayNumber);
224throw new ArgumentOutOfRangeException(null, SR.ArgumentOutOfRange_BadYearMonthDay);
230throw new ArgumentOutOfRangeException(null, SR.ArgumentOutOfRange_BadHourMinuteSecond);
236throw new ArgumentOutOfRangeException(null, SR.Overflow_TimeSpanTooLong);
242throw new ArgumentOutOfRangeException(name, SR.ArgumentOutOfRange_RoundingDigits);
248throw new ArgumentOutOfRangeException(name, SR.ArgumentOutOfRange_RoundingDigits_MathF);
254throw new ArgumentOutOfRangeException(parameterName, value, SR.Format(SR.ArgumentOutOfRange_Range, minInclusive, maxInclusive));
266throw new OverflowException(SR.Overflow_NegateTwosCompNum);
272throw new OverflowException(SR.Overflow_TimeSpanTooLong);
278throw new OverflowException(SR.Overflow_Duration);
284throw new ArgumentException(SR.Arg_CannotBeNaN);
290throw new ArgumentException(SR.Arg_CannotBeNaN, GetArgumentName(argument));
309return new ArgumentException(SR.Format(SR.Argument_AddingDuplicateWithKey, key));
341throw new ArgumentException(SR.Arg_HandleNotSync, paramName);
347throw new ArgumentException(SR.Arg_HandleNotAsync, paramName);
393new EndOfStreamException(SR.IO_EOF_ReadBeyondEOF);
416throw new NullReferenceException(SR.Arg_NullArgumentNullRef);
440throw new NotSupportedException(SR.NotSupported_UnseekableStream);
446throw new NotSupportedException(SR.NotSupported_UnreadableStream);
452throw new NotSupportedException(SR.NotSupported_UnwritableStream);
470throw new ObjectDisposedException(objectName, SR.ObjectDisposed_StreamClosed);
476throw new ObjectDisposedException(null, SR.ObjectDisposed_FileClosed);
512throw new OutOfMemoryException(SR.OutOfMemory_StringTooLong);
518throw new OutOfMemoryException(SR.Lock_Enter_WaiterCountOverflow_OutOfMemoryException);
524throw new ArgumentException(SR.Argument_IncompatibleArrayType);
530throw new ArgumentException(SR.Arg_InvalidHandle, paramName);
536throw new ArgumentOutOfRangeException(nameof(state), state, SR.Argument_UnexpectedStateForKnownCallback);
542throw new InvalidOperationException(SR.InvalidOperation_EnumNotStarted);
548throw new InvalidOperationException(SR.InvalidOperation_EnumEnded);
560throw new InvalidOperationException(SR.InvalidOperation_EnumFailedVersion);
566throw new InvalidOperationException(SR.InvalidOperation_EnumOpCantHappen);
572throw new InvalidOperationException(SR.InvalidOperation_NoValue);
578throw new InvalidOperationException(SR.InvalidOperation_ConcurrentOperationsNotSupported);
584throw new InvalidOperationException(SR.InvalidOperation_HandleIsNotInitialized);
590throw new InvalidOperationException(SR.InvalidOperation_HandleIsNotPinned);
602throw new InvalidOperationException(SR.InvalidOperation_InvalidUtf8);
608throw new FormatException(SR.Argument_BadFormatSpecifier);
614throw new FormatException(SR.Format_NeedSingleChar);
620throw new FormatException(SR.Format(SR.Format_BadBoolean, new string(value)));
626throw new ArgumentOutOfRangeException("precision", SR.Format(SR.Argument_PrecisionTooLarge, StandardFormat.MaxPrecision));
632throw new ArgumentOutOfRangeException("symbol", SR.Argument_BadFormatSpecifier);
638throw new ArgumentOutOfRangeException(paramName, SR.ArgumentOutOfRange_NeedNonNegNum);
644throw new ArgumentOutOfRangeException("value", SR.ArgumentOutOfRange_Enum);
668throw new FormatException(SR.Format_InvalidString);
674throw new FormatException(SR.Format(SR.Format_InvalidStringWithOffsetAndReason, offset, GetResourceString(resource)));
680throw new FormatException(SR.Format_IndexOutOfRange);
686throw new SynchronizationLockException(SR.Lock_Exit_SynchronizationLockException);
692return new AmbiguousMatchException(SR.Format(SR.Arg_AmbiguousMatchException_MemberInfo, declaringType, memberInfo));
697return new AmbiguousMatchException(SR.Format(SR.Arg_AmbiguousMatchException_Attribute, attribute));
702return new AmbiguousMatchException(SR.Format(SR.Arg_AmbiguousMatchException_CustomAttributeData, customAttributeData));
710return new ArgumentOutOfRangeException(nameof(offset), SR.ArgumentOutOfRange_NeedNonNegNum);
712return new ArgumentOutOfRangeException(nameof(count), SR.ArgumentOutOfRange_NeedNonNegNum);
715return new ArgumentException(SR.Argument_InvalidOffLen);
730return new ArgumentException(SR.Format(SR.Arg_WrongType, key, targetType), nameof(key));
735return new ArgumentException(SR.Format(SR.Arg_WrongType, value, targetType), nameof(value));
740return new KeyNotFoundException(SR.Format(SR.Arg_KeyNotFoundWithKey, key));
762SR.InvalidOperation_EnumNotStarted :
763SR.InvalidOperation_EnumEnded);
1084return SR.ArgumentOutOfRange_IndexMustBeLessOrEqual;
1086return SR.ArgumentOutOfRange_IndexMustBeLess;
1088return SR.ArgumentOutOfRange_IndexCount;
1090return SR.ArgumentOutOfRange_IndexCountBuffer;
1092return SR.ArgumentOutOfRange_Count;
1094return SR.ArgumentOutOfRange_Year;
1096return SR.Arg_ArrayPlusOffTooSmall;
1098return SR.Arg_ByteArrayTooSmallForValue;
1100return SR.NotSupported_ReadOnlyCollection;
1102return SR.Arg_RankMultiDimNotSupported;
1104return SR.Arg_NonZeroLowerBound;
1106return SR.ArgumentOutOfRange_GetCharCountOverflow;
1108return SR.ArgumentOutOfRange_ListInsert;
1110return SR.ArgumentOutOfRange_NeedNonNegNum;
1112return SR.ArgumentOutOfRange_SmallCapacity;
1114return SR.Argument_InvalidOffLen;
1116return SR.Argument_CannotExtractScalar;
1118return SR.ArgumentOutOfRange_BiggerThanCollection;
1120return SR.Serialization_MissingKeys;
1122return SR.Serialization_NullKey;
1124return SR.NotSupported_KeyCollectionSet;
1126return SR.NotSupported_ValueCollectionSet;
1128return SR.InvalidOperation_NullArray;
1130return SR.TaskT_TransitionToFinal_AlreadyCompleted;
1132return SR.TaskCompletionSourceT_TrySetException_NullException;
1134return SR.TaskCompletionSourceT_TrySetException_NoExceptions;
1136return SR.NotSupported_StringComparison;
1138return SR.ConcurrentCollection_SyncRoot_NotSupported;
1140return SR.Task_MultiTaskContinuation_NullTask;
1142return SR.InvalidOperation_WrongAsyncResultOrEndCalledMultiple;
1144return SR.Task_MultiTaskContinuation_EmptyTaskList;
1146return SR.Task_Start_TaskCompleted;
1148return SR.Task_Start_Promise;
1150return SR.Task_Start_ContinuationTask;
1152return SR.Task_Start_AlreadyStarted;
1154return SR.Task_RunSynchronously_Continuation;
1156return SR.Task_RunSynchronously_Promise;
1158return SR.Task_RunSynchronously_TaskCompleted;
1160return SR.Task_RunSynchronously_AlreadyStarted;
1162return SR.AsyncMethodBuilder_InstanceNotInitialized;
1164return SR.Task_ContinueWith_ESandLR;
1166return SR.Task_ContinueWith_NotOnAnything;
1168return SR.Task_InvalidTimerTimeSpan;
1170return SR.Task_Delay_InvalidMillisecondsDelay;
1172return SR.Task_Dispose_NotCompleted;
1174return SR.Task_ThrowIfDisposed;
1176return SR.Task_WaitMulti_NullTask;
1178return SR.ArgumentException_OtherNotArrayOfCorrectLength;
1180return SR.ArgumentNull_Array;
1182return SR.ArgumentNull_SafeHandle;
1184return SR.ArgumentOutOfRange_EndIndexStartIndex;
1186return SR.ArgumentOutOfRange_Enum;
1188return SR.ArgumentOutOfRange_HugeArrayNotSupported;
1190return SR.Argument_AddingDuplicate;
1192return SR.Argument_InvalidArgumentForComparison;
1194return SR.Arg_LowerBoundsMustMatch;
1196return SR.Arg_MustBeType;
1198return SR.Arg_Need1DArray;
1200return SR.Arg_Need2DArray;
1202return SR.Arg_Need3DArray;
1204return SR.Arg_NeedAtLeast1Rank;
1206return SR.Arg_RankIndices;
1208return SR.Arg_RanksAndBounds;
1210return SR.InvalidOperation_IComparerFailed;
1212return SR.NotSupported_FixedSizeCollection;
1214return SR.Rank_MultiDimNotSupported;
1216return SR.Arg_TypeNotSupported;
1218return SR.Argument_SpansMustHaveSameLength;
1220return SR.Argument_InvalidFlag;
1222return SR.CancellationTokenSource_Disposed;
1224return SR.Argument_AlignmentMustBePow2;
1226return SR.ArgumentOutOfRange_NotGreaterThanBufferLength;
1228return SR.InvalidOperation_SpanOverlappedOperation;
1230return SR.InvalidOperation_TimeProviderNullLocalTimeZone;
1232return SR.InvalidOperation_TimeProviderInvalidTimestampFrequency;
1234return SR.Format_UnexpectedClosingBrace;
1236return SR.Format_UnclosedFormatItem;
1238return SR.Format_ExpectedAsciiDigit;
1240return SR.Argument_HasToBeArrayClass;
1242return SR.InvalidOperation_IncompatibleComparer;
src\libraries\System.Private.CoreLib\src\System\TimeZoneInfo.AdjustmentRule.cs (9)
184throw new ArgumentException(SR.Argument_DateTimeKindMustBeUnspecifiedOrUtc, nameof(dateStart));
189throw new ArgumentException(SR.Argument_DateTimeKindMustBeUnspecifiedOrUtc, nameof(dateEnd));
194throw new ArgumentException(SR.Argument_TransitionTimesAreIdentical, nameof(daylightTransitionEnd));
199throw new ArgumentException(SR.Argument_OutOfOrderDateTimes, nameof(dateStart));
208throw new ArgumentOutOfRangeException(nameof(daylightDelta), daylightDelta, SR.ArgumentOutOfRange_UtcOffset);
213throw new ArgumentException(SR.Argument_TimeSpanHasSeconds, nameof(daylightDelta));
218throw new ArgumentException(SR.Argument_DateTimeHasTimeOfDay, nameof(dateStart));
223throw new ArgumentException(SR.Argument_DateTimeHasTimeOfDay, nameof(dateEnd));
259throw new SerializationException(SR.Serialization_InvalidData, e);
src\libraries\System.Private.CoreLib\src\System\TimeZoneInfo.cs (21)
198throw new ArgumentException(SR.Argument_DateTimeOffsetIsNotAmbiguous, nameof(dateTimeOffset));
213throw new ArgumentException(SR.Argument_DateTimeOffsetIsNotAmbiguous, nameof(dateTimeOffset));
243throw new ArgumentException(SR.Argument_DateTimeIsNotAmbiguous, nameof(dateTime));
272throw new ArgumentException(SR.Argument_DateTimeIsNotAmbiguous, nameof(dateTime));
619throw new SecurityException(SR.Format(SR.Security_CannotReadFileData, id), e);
621throw new TimeZoneNotFoundException(SR.Format(SR.TimeZoneNotFound_MissingData, id), e);
759throw new ArgumentException(SR.Argument_ConvertMismatch, nameof(sourceTimeZone));
784throw new ArgumentException(SR.Argument_DateTimeIsInvalid, nameof(dateTime));
870throw new ArgumentException(SR.Format(SR.Argument_InvalidSerializedString, source), nameof(source));
1131throw new SerializationException(SR.Format(SR.Serialization_CorruptField, "SupportsDaylightSavingTime"));
1136throw new SerializationException(SR.Serialization_InvalidData, e);
1140throw new SerializationException(SR.Serialization_InvalidData, e);
2163throw new ArgumentOutOfRangeException(nameof(baseUtcOffset), SR.ArgumentOutOfRange_UtcOffset);
2168throw new ArgumentException(SR.Argument_TimeSpanHasSeconds, nameof(baseUtcOffset));
2190throw new InvalidTimeZoneException(SR.Argument_AdjustmentRulesNoNulls);
2195throw new InvalidTimeZoneException(SR.ArgumentOutOfRange_UtcOffsetAndDaylightDelta);
2201throw new InvalidTimeZoneException(SR.Argument_AdjustmentRulesOutOfOrder);
src\libraries\System.Private.CoreLib\src\System\Tuple.cs (17)
154throw new ArgumentException(SR.Format(SR.ArgumentException_TupleIncorrectType, GetType()), nameof(other));
274throw new ArgumentException(SR.Format(SR.ArgumentException_TupleIncorrectType, GetType()), nameof(other));
399throw new ArgumentException(SR.Format(SR.ArgumentException_TupleIncorrectType, GetType()), nameof(other));
534throw new ArgumentException(SR.Format(SR.ArgumentException_TupleIncorrectType, GetType()), nameof(other));
679throw new ArgumentException(SR.Format(SR.ArgumentException_TupleIncorrectType, GetType()), nameof(other));
834throw new ArgumentException(SR.Format(SR.ArgumentException_TupleIncorrectType, GetType()), nameof(other));
999throw new ArgumentException(SR.Format(SR.ArgumentException_TupleIncorrectType, GetType()), nameof(other));
1128throw new ArgumentException(SR.ArgumentException_TupleLastArgumentNotATuple);
1179throw new ArgumentException(SR.Format(SR.ArgumentException_TupleIncorrectType, GetType()), nameof(other));
src\libraries\System.Private.CoreLib\src\System\Type.cs (19)
66public virtual bool IsByRefLike { [Intrinsic] get => throw new NotSupportedException(SR.NotSupported_SubclassOverride); }
75public virtual int GetArrayRank() => throw new NotSupportedException(SR.NotSupported_SubclassOverride);
78public virtual Type GetGenericTypeDefinition() => throw new NotSupportedException(SR.NotSupported_SubclassOverride);
80public virtual Type[] GetGenericArguments() => throw new NotSupportedException(SR.NotSupported_SubclassOverride);
85public virtual int GenericParameterPosition => throw new InvalidOperationException(SR.Arg_NotGenericParameter);
90throw new InvalidOperationException(SR.Arg_NotGenericParameter);
248public virtual MemberInfo[] GetMember(string name, MemberTypes type, BindingFlags bindingAttr) => throw new NotSupportedException(SR.NotSupported_SubclassOverride);
289new ArgumentException(SR.Format(SR.Arg_MemberInfoNotFound, member.Name), nameof(member));
488throw new ArgumentException(SR.ArgumentNull_ArrayValue, nameof(args));
600public virtual InterfaceMapping GetInterfaceMap([DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.PublicMethods | DynamicallyAccessedMemberTypes.NonPublicMethods)] Type interfaceType) => throw new NotSupportedException(SR.NotSupported_SubclassOverride);
611throw new ArgumentException(SR.Arg_MustBeEnum, "enumType");
615throw new ArgumentException(SR.Argument_InvalidEnum, "enumType");
624throw new ArgumentException(SR.Arg_MustBeEnum, "enumType");
640public virtual Array GetEnumValuesAsUnderlyingType() => throw new NotSupportedException(SR.NotSupported_SubclassOverride);
650public virtual Type MakeGenericType(params Type[] typeArguments) => throw new NotSupportedException(SR.NotSupported_SubclassOverride);
660throw new ArgumentException(SR.Format(SR.Arg_NotGenericTypeDefinition, genericTypeDefinition), nameof(genericTypeDefinition));
724public static Type? ReflectionOnlyGetType(string typeName, bool throwIfNotFound, bool ignoreCase) => throw new PlatformNotSupportedException(SR.PlatformNotSupported_ReflectionOnly);
src\System\Delegate.CoreCLR.cs (22)
51throw new ArgumentException(SR.Arg_DlgtTargMeth);
63throw new ArgumentException(SR.Arg_UnboundGenParam, nameof(target));
65throw new ArgumentException(SR.Argument_MustBeRuntimeType, nameof(target));
232throw new ArgumentException(SR.Argument_MustBeRuntimeType, nameof(type));
234throw new ArgumentException(SR.Arg_MustBeDelegate, nameof(type));
251throw new ArgumentException(SR.Arg_DlgtTargMeth);
267throw new ArgumentException(SR.Arg_UnboundGenParam, nameof(target));
269throw new ArgumentException(SR.Argument_MustBeRuntimeType, nameof(type));
271throw new ArgumentException(SR.Argument_MustBeRuntimeType, nameof(target));
274throw new ArgumentException(SR.Arg_MustBeDelegate, nameof(type));
287throw new ArgumentException(SR.Arg_DlgtTargMeth);
302throw new ArgumentException(SR.Argument_MustBeRuntimeType, nameof(type));
305throw new ArgumentException(SR.Argument_MustBeRuntimeMethodInfo, nameof(method));
308throw new ArgumentException(SR.Arg_MustBeDelegate, nameof(type));
325throw new ArgumentException(SR.Arg_DlgtTargMeth);
337throw new ArgumentException(SR.Argument_MustBeRuntimeType, nameof(type));
340throw new ArgumentException(SR.Argument_MustBeRuntimeMethodInfo, nameof(method));
343throw new ArgumentException(SR.Arg_MustBeDelegate, nameof(type));
357throw new ArgumentException(SR.Arg_DlgtTargMeth);
375throw new ArgumentException(SR.Argument_MustBeRuntimeType, nameof(type));
378throw new ArgumentException(SR.Arg_MustBeDelegate, nameof(type));
391throw new ArgumentException(SR.Arg_DlgtTargMeth);
src\System\Reflection\Emit\DynamicILGenerator.cs (25)
40throw new ArgumentException(SR.Argument_MustBeRuntimeType);
65throw new ArgumentException(SR.Argument_MustBeRuntimeMethodInfo, nameof(meth));
79throw new ArgumentException(SR.Argument_InvalidOpCodeOnDynamicMethod);
114throw new ArgumentException(SR.Argument_MustBeRuntimeMethodInfo, nameof(con));
133RuntimeType rtType = type as RuntimeType ?? throw new ArgumentException(SR.Argument_MustBeRuntimeType);
145throw new ArgumentException(SR.Argument_MustBeRuntimeFieldInfo, nameof(field));
180throw new InvalidOperationException(SR.InvalidOperation_NotAVarArgCallingConvention);
252throw new ArgumentException(SR.Argument_NotMethodCallOpcode, nameof(opcode));
255throw new ArgumentException(SR.Argument_GenericsInvalid, nameof(methodInfo));
258throw new ArgumentException(SR.Argument_GenericsInvalid, nameof(methodInfo));
323throw new NotSupportedException(SR.Argument_NotInExceptionBlock);
337throw new NotSupportedException(SR.Argument_NotInExceptionBlock);
347throw new ArgumentException(SR.Argument_ShouldNotSpecifyExceptionType);
360throw new ArgumentException(SR.Argument_MustBeRuntimeType);
383throw new NotSupportedException(SR.InvalidOperation_NotAllowedInDynamicMethod);
388throw new NotSupportedException(SR.InvalidOperation_NotAllowedInDynamicMethod);
393throw new NotSupportedException(SR.InvalidOperation_NotAllowedInDynamicMethod);
403throw new InvalidOperationException(SR.InvalidOperation_NotAVarArgCallingConvention);
409throw new ArgumentException(SR.Argument_MustBeRuntimeMethodInfo, nameof(methodInfo));
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\SignatureHelper.cs (21)
102throw new ArgumentException(SR.Argument_UnknownUnmanagedCallConv, nameof(unmanagedCallConv));
198throw new ArgumentException(SR.Argument_BadFieldSig);
227throw new ArgumentException(SR.NotSupported_MustBeModuleBuilder);
285throw new ArgumentException(SR.Argument_ArraysInvalid, nameof(optionalCustomModifiers));
288throw new ArgumentException(SR.Argument_GenericsInvalid, nameof(optionalCustomModifiers));
307throw new ArgumentException(SR.Argument_ArraysInvalid, nameof(requiredCustomModifiers));
310throw new ArgumentException(SR.Argument_GenericsInvalid, nameof(requiredCustomModifiers));
487throw new ArgumentException(SR.Argument_LargeInteger);
512throw new ArgumentException(SR.Argument_LargeInteger);
723throw new ArgumentException(SR.Argument_LargeInteger);
745throw new ArgumentException(SR.Argument_MustBeRuntimeType, nameof(optionalCustomModifiers));
748throw new ArgumentException(SR.Argument_ArraysInvalid, nameof(optionalCustomModifiers));
751throw new ArgumentException(SR.Argument_GenericsInvalid, nameof(optionalCustomModifiers));
768throw new ArgumentException(SR.Argument_MustBeRuntimeType, nameof(requiredCustomModifiers));
771throw new ArgumentException(SR.Argument_ArraysInvalid, nameof(requiredCustomModifiers));
774throw new ArgumentException(SR.Argument_GenericsInvalid, nameof(requiredCustomModifiers));
806throw new ArgumentException(SR.Format(SR.Argument_MismatchedArrays, nameof(requiredCustomModifiers), nameof(arguments)));
809throw new ArgumentException(SR.Format(SR.Argument_MismatchedArrays, nameof(optionalCustomModifiers), nameof(arguments)));
823throw new ArgumentException(SR.Argument_SigIsFinalized);
src\System\Reflection\RuntimeModule.cs (40)
39throw new ArgumentException(SR.Argument_InvalidGenericInstArray);
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),
125throw new ArgumentException(SR.Argument_BadImageFormatExceptionResolve, e);
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),
214throw new ArgumentException(SR.Argument_BadImageFormatExceptionResolve, e);
226throw new ArgumentException(SR.Format(SR.Argument_ResolveModuleType, tk), nameof(metadataToken));
229throw new ArgumentException(SR.Format(SR.Argument_ResolveType, tk, this), nameof(metadataToken));
246throw new ArgumentException(SR.Argument_BadImageFormatExceptionResolve, e);
256throw new ArgumentException(SR.InvalidOperation_PropertyInfoNotAvailable);
259throw new ArgumentException(SR.InvalidOperation_EventInfoNotAvailable);
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));
363throw new ArgumentException(SR.Arg_MustBeType, nameof(attributeType));
373throw new ArgumentException(SR.Arg_MustBeType, nameof(attributeType));
src\System\Reflection\TypeNameResolver.CoreCLR.cs (17)
55throw new TypeLoadException(SR.Arg_TypeLoadNullStr);
91return throwOnError ? throw new ArgumentException(SR.Argument_AssemblyGetTypeCannotSpecifyAssembly) : null;
145throw new TypeLoadException(SR.Arg_TypeLoadNullStr);
177throw new FileNotFoundException(SR.Format(SR.FileNotFound_ResolveAssembly, assemblyName));
220SR.Format(SR.TypeLoad_ResolveType, escapedTypeName) :
221SR.Format(SR.TypeLoad_ResolveTypeFromAssembly, escapedTypeName, assembly.FullName),
235throw new TypeLoadException(SR.Format(SR.TypeLoad_ResolveType, escapedTypeName), typeName: escapedTypeName);
254throw new TypeLoadException(SR.Format(SR.TypeLoad_ResolveTypeFromAssembly, parsedName.FullName, runtimeAssembly.FullName),
289throw new TypeLoadException(SR.Format(SR.TypeLoad_ResolveNestedType,
328throw new TypeLoadException(SR.Format(SR.TypeLoad_ResolveTypeFromAssembly, parsedName.FullName, (requestingAssembly ?? coreLib).FullName),
src\System\Runtime\InteropServices\Marshal.CoreCLR.cs (11)
46throw new ArgumentException(SR.Format(SR.Argument_OffsetOfFieldNotFound, t.FullName), nameof(fieldName));
50throw new ArgumentException(SR.Argument_MustBeRuntimeFieldInfo, nameof(fieldName));
219throw new ArgumentException(SR.Argument_MustBeRuntimeMethodInfo, nameof(m));
252throw new ArgumentException(SR.Argument_NeedNonGenericObject, nameof(structure));
257throw new ArgumentException(SR.Argument_MustHaveLayoutOrBeBlittable, nameof(structure));
282throw new ArgumentException(SR.Argument_StructMustNotBeValueClass, nameof(structure));
287throw new ArgumentException(SR.Argument_MustHaveLayoutOrBeBlittable, nameof(structure));
311throw new ArgumentException(SR.Argument_MustBeRuntimeType, nameof(structuretype));
314throw new ArgumentException(SR.Argument_NeedNonGenericType, nameof(structuretype));
319throw new ArgumentException(SR.Argument_MustHaveLayoutOrBeBlittable, nameof(structuretype));
src\System\RuntimeType.CoreCLR.cs (41)
1837throw new ArgumentException(SR.Format(
1838SR.Argument_ResolveMethodHandle,
1865throw new ArgumentException(SR.Format(
1866SR.Argument_ResolveMethodHandle,
1887throw new ArgumentException(SR.Format(
1888SR.Argument_ResolveMethodHandle,
1962throw new ArgumentException(SR.Format(
1963SR.Argument_ResolveFieldHandle,
2021SR.Format(SR.Argument_GenConstraintViolation, i.ToString(), genericArgument, definition, genericParameter), e);
2713throw new InvalidOperationException(SR.Arg_GenericParameter);
2718throw new ArgumentException(SR.Argument_MustBeRuntimeType, nameof(interfaceType));
2729throw new ArgumentException(SR.Argument_ArrayGetInterfaceMap);
3252throw new InvalidOperationException(SR.Arg_NotGenericParameter);
3528throw new InvalidOperationException(SR.InvalidOperation_NotGenericType);
3538throw new InvalidOperationException(SR.Arg_NotGenericParameter);
3576throw new InvalidOperationException(SR.Format(SR.Arg_NotGenericTypeDefinition, this));
3580throw new ArgumentException(SR.Argument_GenericArgsCount, nameof(typeArguments));
3646throw new InvalidOperationException(SR.Arg_NotGenericParameter);
3658throw new InvalidOperationException(SR.Arg_NotGenericParameter);
3776throw new InvalidOperationException(SR.InvalidOperation_NotFunctionPointer);
3787throw new InvalidOperationException(SR.InvalidOperation_NotFunctionPointer);
3805throw new InvalidOperationException(SR.InvalidOperation_NotFunctionPointer);
3835throw new ArgumentException(SR.Format(SR.Acc_CreateGenericEx, this));
3840throw new NotSupportedException(SR.Acc_CreateArgIterator);
3843throw new NotSupportedException(SR.Acc_CreateVoid);
3893throw new MissingMethodException(SR.Format(SR.MissingConstructor_Name, FullName));
3912throw new MissingMethodException(SR.Format(SR.MissingConstructor_Name, FullName), innerMME);
3917throw new MissingMethodException(SR.Format(SR.MissingConstructor_Name, FullName));
3926throw new NotSupportedException(SR.NotSupported_CallToVarArg);
3974throw new MissingMethodException(SR.Format(SR.Arg_NoDefCTor, this));
4003throw new MissingMethodException(SR.Format(SR.Arg_NoDefCTor, this));
4031throw new MissingMethodException(SR.Format(SR.Arg_NoDefCTor, this));