259 references to Format
System.Private.CoreLib (259)
src\libraries\Common\src\Interop\Unix\Interop.IOErrors.cs (6)
126new FileNotFoundException(SR.Format(SR.IO_FileNotFound_FileName, path), path) : 133new DirectoryNotFoundException(SR.Format(SR.IO_PathNotFound_Path, path)) : 141new UnauthorizedAccessException(SR.Format(SR.UnauthorizedAccess_IODenied_Path, path), inner) : 146new PathTooLongException(SR.Format(SR.IO_PathTooLong_Path, path)) : 151new IOException(SR.Format(SR.IO_SharingViolation_File, path), errorInfo.RawErrno) : 163return new IOException(SR.Format(SR.IO_FileExists_Name, path), errorInfo.RawErrno);
src\libraries\Common\src\System\IO\Win32Marshal.cs (7)
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\ArgumentException.cs (1)
82s += " " + SR.Format(SR.Arg_ParamName_Name, _paramName);
src\libraries\System.Private.CoreLib\src\System\ArgumentOutOfRangeException.cs (1)
78string valueMessage = SR.Format(SR.ArgumentOutOfRange_ActualValue, _actualValue);
src\libraries\System.Private.CoreLib\src\System\BadImageFormatException.cs (1)
98s += Environment.NewLineConst + SR.Format(SR.IO_FileName_Name, _fileName);
src\libraries\System.Private.CoreLib\src\System\Buffers\StandardFormat.cs (2)
116return throws ? throw new FormatException(SR.Format(SR.Argument_CannotParsePrecision, MaxPrecision)) : false; 121return throws ? throw new FormatException(SR.Format(SR.Argument_PrecisionTooLarge, MaxPrecision)) : false;
src\libraries\System.Private.CoreLib\src\System\Char.cs (1)
1133throw new ArgumentException(SR.Format(invalidIsLow ? SR.Argument_InvalidLowSurrogate : SR.Argument_InvalidHighSurrogate, index), nameof(s));
src\libraries\System.Private.CoreLib\src\System\Collections\ArrayList.cs (1)
39if (capacity < 0) throw new ArgumentOutOfRangeException(nameof(capacity), SR.Format(SR.ArgumentOutOfRange_MustBeNonNegNum, nameof(capacity)));
src\libraries\System.Private.CoreLib\src\System\Convert.cs (3)
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));
src\libraries\System.Private.CoreLib\src\System\DateOnly.cs (1)
697case ParseFailureKind.Format_BadDateOnly: throw new FormatException(SR.Format(SR.Format_BadDateOnly, s.ToString()));
src\libraries\System.Private.CoreLib\src\System\Diagnostics\Contracts\Contracts.cs (1)
654throw new ArgumentException(SR.Format(SR.Arg_EnumIllegalVal, failureKind), nameof(failureKind));
src\libraries\System.Private.CoreLib\src\System\Diagnostics\Tracing\EventSource.cs (5)
2817throw new ArgumentException(SR.Format(SR.EventSource_EventSourceGuidInUse, m_guid)); 3140manifest.ManifestError(SR.Format(SR.EventSource_AbstractMustNotDeclareKTOC, nestedType.Name)); 3602manifest.ManifestError(SR.Format(SR.EventSource_EventNameReused, evtName), true); 5703ManifestError(SR.Format(SR.EventSource_DuplicateStringKey, key), true); 5917ManifestError(SR.Format(SR.EventSource_UnsupportedEventTypeInManifest, type.Name), true);
src\libraries\System.Private.CoreLib\src\System\Diagnostics\Tracing\TraceLogging\EventPayload.cs (1)
44throw new KeyNotFoundException(SR.Format(SR.Arg_KeyNotFoundWithKey, key));
src\libraries\System.Private.CoreLib\src\System\Diagnostics\Tracing\TraceLogging\Statics.cs (1)
585throw new ArgumentException(SR.Format(SR.EventSource_NonCompliantTypeError, dataType.Name));
src\libraries\System.Private.CoreLib\src\System\Diagnostics\Tracing\TraceLogging\TraceLoggingEventSource.cs (3)
759throw new ArgumentException(SR.Format(SR.EventSource_UnknownEtwTrait, etwTrait.ToString()), "traits"); 828throw new ArgumentException(SR.Format(SR.EventSource_IllegalValue, value), "traits"); 852throw new ArgumentException(SR.Format(SR.EventSource_BadHexDigit, c), "traits");
src\libraries\System.Private.CoreLib\src\System\Enum.cs (1)
1123throw new ArgumentException(SR.Format(SR.Arg_EnumValueNotFound, originalValue.ToString()));
src\libraries\System.Private.CoreLib\src\System\Environment.cs (3)
128throw new ArgumentOutOfRangeException(nameof(folder), folder, SR.Format(SR.Arg_EnumIllegalVal, folder)); 131throw new ArgumentOutOfRangeException(nameof(option), option, SR.Format(SR.Arg_EnumIllegalVal, option)); 234throw new ArgumentOutOfRangeException(nameof(target), target, SR.Format(SR.Arg_EnumIllegalVal, target));
src\libraries\System.Private.CoreLib\src\System\Exception.cs (1)
61public virtual string Message => _message ?? SR.Format(SR.Exception_WasThrown, GetClassName());
src\libraries\System.Private.CoreLib\src\System\Globalization\CultureData.cs (1)
732throw new ArgumentException(SR.Format(SR.Argument_InvalidId, nameof(name)));
src\libraries\System.Private.CoreLib\src\System\Globalization\CultureInfo.cs (4)
341throw new ArgumentException(SR.Format(SR.Argument_InvalidResourceCultureName, cultureName)); 1137throw new CultureNotFoundException(nameof(name), name, SR.Format(SR.Argument_InvalidPredefinedCultureName, name)); 1179throw new CultureNotFoundException(nameof(name), SR.Format(SR.Argument_CultureIetfNotSupported, name)); 1187throw new CultureNotFoundException(nameof(name), SR.Format(SR.Argument_CultureIetfNotSupported, name));
src\libraries\System.Private.CoreLib\src\System\Globalization\CultureNotFoundException.cs (1)
97string valueMessage = SR.Format(SR.Argument_CultureInvalidIdentifier, FormattedInvalidCultureId);
src\libraries\System.Private.CoreLib\src\System\Globalization\DateTimeFormat.cs (3)
330throw new FormatException(SR.Format(SR.Format_BadQuote, quoteChar)); 1210throw new FormatException(SR.Format(SR.Format_BadQuote, quoteChar)); 1282throw new FormatException(SR.Format(SR.Format_BadQuote, quoteChar));
src\libraries\System.Private.CoreLib\src\System\Globalization\DateTimeFormatInfo.cs (9)
1060throw new ArgumentException(SR.Format(SR.Argument_InvalidArrayLength, 7), nameof(value)); 1085throw new ArgumentException(SR.Format(SR.Argument_InvalidArrayLength, 7), nameof(value)); 1105throw new ArgumentException(SR.Format(SR.Argument_InvalidArrayLength, 7), nameof(value)); 1127throw new ArgumentException(SR.Format(SR.Argument_InvalidArrayLength, 13), nameof(value)); 1148throw new ArgumentException(SR.Format(SR.Argument_InvalidArrayLength, 13), nameof(value)); 1353throw new ArgumentException(SR.Format(SR.Format_BadFormatSpecifier, format), nameof(format)); 1677throw new ArgumentException(SR.Format(SR.Format_BadFormatSpecifier, format), nameof(format)); 1693throw new ArgumentException(SR.Format(SR.Argument_InvalidArrayLength, 13), nameof(value)); 1714throw new ArgumentException(SR.Format(SR.Argument_InvalidArrayLength, 13), nameof(value));
src\libraries\System.Private.CoreLib\src\System\Globalization\DateTimeParse.cs (10)
5185return new FormatException(SR.Format(SR.Format_BadDatePattern, new string(result.failureSpanArgument))); 5187return new FormatException(SR.Format(SR.Format_BadDateTime, new string(result.failureSpanArgument))); 5191return new FormatException(SR.Format(SR.Format_BadDayOfWeek, new string(result.failureSpanArgument))); 5193return new FormatException(SR.Format(SR.Format_BadFormatSpecifier, new string(result.failureSpanArgument))); 5195return new FormatException(SR.Format(SR.Format_BadQuote, (char)result.failureIntArgument)); 5197return new FormatException(SR.Format(SR.Format_DateOutOfRange, new string(result.failureSpanArgument))); 5199return new FormatException(SR.Format(SR.Format_MissingIncompleteDate, new string(result.failureSpanArgument))); 5203return new FormatException(SR.Format(SR.Format_OffsetOutOfRange, new string(result.failureSpanArgument))); 5205return new FormatException(SR.Format(SR.Format_RepeatDateTimePattern, (char)result.failureIntArgument)); 5209return new FormatException(SR.Format(SR.Format_UTCOutOfRange, new string(result.failureSpanArgument)));
src\libraries\System.Private.CoreLib\src\System\Globalization\IdnMapping.cs (8)
83throw new ArgumentException(SR.Format(SR.Argument_InvalidCharSequence, index + count - 1), nameof(unicode)); 204throw new ArgumentException(SR.Format(SR.Argument_InvalidCharSequence, unicode.Length - 1), nameof(unicode)); 232throw new ArgumentException(SR.Format(SR.Argument_InvalidCharSequence, i), nameof(unicode)); 272throw new ArgumentException(SR.Format(SR.Argument_IdnBadNameSize, 511throw new ArgumentException(SR.Format(SR.Argument_IdnBadNameSize, 538throw new ArgumentException(SR.Format(SR.Argument_IdnBadStd3, c), nameof(c)); 587throw new ArgumentException(SR.Format(SR.Argument_IdnBadNameSize, 804throw new ArgumentException(SR.Format(SR.Argument_IdnBadNameSize, c_defaultNameLimit - (IsDot(output[output.Length - 1]) ? 0 : 1)), nameof(ascii));
src\libraries\System.Private.CoreLib\src\System\Globalization\Normalization.Nls.cs (2)
50throw new InvalidOperationException(SR.Format(SR.UnknownError_Num, lastError)); 130throw new InvalidOperationException(SR.Format(SR.UnknownError_Num, lastError));
src\libraries\System.Private.CoreLib\src\System\Globalization\RegionInfo.cs (5)
38throw new ArgumentException(SR.Format(SR.Argument_InvalidCultureName, name), nameof(name)); 43throw new ArgumentException(SR.Format(SR.Argument_InvalidNeutralRegionName, name), nameof(name)); 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\TimeSpanParse.cs (4)
523throw new FormatException(SR.Format(SR.Format_BadQuote, failingCharacter)); 554throw new OverflowException(SR.Format(SR.Overflow_TimeSpanElementTooLarge, new string(_originalTimeSpanString))); 564throw new FormatException(SR.Format(SR.Format_BadTimeSpan, new string(_originalTimeSpanString))); 574throw new FormatException(SR.Format(SR.Format_BadFormatSpecifier, formatSpecifierCharacter));
src\libraries\System.Private.CoreLib\src\System\Guid.cs (2)
90throw new ArgumentException(SR.Format(SR.Arg_GuidArrayCtor, "16"), "b"); 116throw new ArgumentException(SR.Format(SR.Arg_GuidArrayCtor, "8"), nameof(d));
src\libraries\System.Private.CoreLib\src\System\IO\BinaryReader.cs (1)
251throw new IOException(SR.Format(SR.IO_InvalidStringLen_Len, stringLength));
src\libraries\System.Private.CoreLib\src\System\IO\BufferedStream.cs (1)
72throw new ArgumentOutOfRangeException(nameof(bufferSize), SR.Format(SR.ArgumentOutOfRange_MustBePositive, nameof(bufferSize)));
src\libraries\System.Private.CoreLib\src\System\IO\File.cs (1)
887throw new FileNotFoundException(SR.Format(SR.IO_FileNotFound_FileName, fullSourceFileName), fullSourceFileName);
src\libraries\System.Private.CoreLib\src\System\IO\FileInfo.cs (3)
40throw new FileNotFoundException(SR.Format(SR.IO_FileNotFound_FileName, FullPath), FullPath); 164throw new DirectoryNotFoundException(SR.Format(SR.IO_PathNotFound_Path, FullName)); 167throw new FileNotFoundException(SR.Format(SR.IO_FileNotFound_FileName, FullName), FullName);
src\libraries\System.Private.CoreLib\src\System\IO\FileLoadException.cs (1)
55s += Environment.NewLineConst + SR.Format(SR.IO_FileName_Name, FileName);
src\libraries\System.Private.CoreLib\src\System\IO\FileNotFoundException.cs (1)
78s += Environment.NewLineConst + SR.Format(SR.IO_FileName_Name, FileName);
src\libraries\System.Private.CoreLib\src\System\IO\FileSystem.Unix.cs (12)
59return new IOException(SR.Format(SR.Arg_FileIsDirectory_Name, path)); 133throw new UnauthorizedAccessException(SR.Format(SR.IO_NotAFile, sourceFullPath)); 142throw new UnauthorizedAccessException(SR.Format(SR.IO_NotAFile, destFullPath)); 411throw new IOException(SR.Format(SR.IO_PathNotFound_Path, sourceFullPath)); 423throw new DirectoryNotFoundException(SR.Format(SR.IO_PathNotFound_Path, sourceFullPath)); 443throw new IOException(SR.Format(SR.IO_PathNotFound_Path, sourceFullPath)); 447throw new IOException(SR.Format(SR.IO_AlreadyExists_Name, destFullPath)); 457throw new IOException(SR.Format(SR.UnauthorizedAccess_IODenied_Path, sourceFullPath), errorInfo.RawErrno); 459throw new DirectoryNotFoundException(SR.Format(SR.IO_PathNotFound_Path, sourceFullPath)); 461throw new IOException(SR.Format(SR.IO_PathNotFound_Path, sourceFullPath)); 567throw new IOException(SR.Format(SR.UnauthorizedAccess_IODenied_Path, fullPath)); 706throw new IOException(SR.Format(SR.IO_TooManySymbolicLinkLevels, linkPath));
src\libraries\System.Private.CoreLib\src\System\Number.Parsing.cs (2)
1046SR.Format(SR.Format_InvalidStringWithValue, Encoding.UTF8.GetString(bytes)) : 1051errorMessage = SR.Format(SR.Format_InvalidStringWithValue, value.ToString());
src\libraries\System.Private.CoreLib\src\System\ObjectDisposedException.cs (1)
99string objectDisposed = SR.Format(SR.ObjectDisposed_ObjectName_Name, name);
src\libraries\System.Private.CoreLib\src\System\OperatingSystem.cs (1)
59throw new ArgumentOutOfRangeException(nameof(platform), platform, SR.Format(SR.Arg_EnumIllegalVal, platform));
src\libraries\System.Private.CoreLib\src\System\Reflection\Assembly.cs (3)
37throw new NotSupportedException(SR.Format(SR.NotSupported_NoTypeInfo, types[i].FullName)); 259throw new ArgumentException(SR.Format(SR.Argument_AbsolutePathRequired, path), nameof(path)); 273throw new FileNotFoundException(SR.Format(SR.FileNotFound_LoadFile, normalizedPath), normalizedPath);
src\libraries\System.Private.CoreLib\src\System\Reflection\Emit\MethodBuilderInstantiation.cs (1)
91throw new InvalidOperationException(SR.Format(SR.Arg_NotGenericMethodDefinition, this));
src\libraries\System.Private.CoreLib\src\System\Reflection\Emit\MethodOnTypeBuilderInstantiation.cs (1)
110throw new InvalidOperationException(SR.Format(SR.Arg_NotGenericMethodDefinition, this));
src\libraries\System.Private.CoreLib\src\System\Reflection\Emit\TypeBuilderInstantiation.cs (1)
255public override Type MakeGenericType(params Type[] inst) { throw new InvalidOperationException(SR.Format(SR.Arg_NotGenericTypeDefinition, this)); }
src\libraries\System.Private.CoreLib\src\System\Reflection\RuntimeConstructorInfo.cs (3)
57SR.Format(SR.Acc_CreateInterfaceEx, declaringType)); 62SR.Format(SR.Acc_CreateAbstEx, declaringType)); 76SR.Format(SR.Acc_CreateGenericEx, declaringType));
src\libraries\System.Private.CoreLib\src\System\Resources\FileBasedResourceGroveler.cs (1)
104throw new InvalidOperationException(SR.Format(SR.InvalidOperation_ResMgrBadResSet_Type, _mediator.UserResourceSet.AssemblyQualifiedName), e);
src\libraries\System.Private.CoreLib\src\System\Resources\ManifestBasedResourceGroveler.cs (3)
140throw new ArgumentException(SR.Format(SR.Arg_InvalidNeutralResourcesLanguage_FallbackLoc, fallbackLocation)); 209throw new NotSupportedException(SR.Format(SR.NotSupported_ObsoleteResourcesFile, _mediator.MainAssembly.GetName().Name)); 267throw new InvalidOperationException(SR.Format(SR.InvalidOperation_ResMgrBadResSet_Type, _mediator.UserResourceSet.AssemblyQualifiedName), e);
src\libraries\System.Private.CoreLib\src\System\Resources\NeutralResourcesLanguageAttribute.cs (1)
25throw new ArgumentException(SR.Format(SR.Arg_InvalidNeutralResourcesLanguage_FallbackLoc, location));
src\libraries\System.Private.CoreLib\src\System\Resources\ResourceManager.cs (1)
733throw new InvalidOperationException(SR.Format(SR.InvalidOperation_ResourceNotStream_Name, name));
src\libraries\System.Private.CoreLib\src\System\Resources\ResourceReader.Core.cs (3)
151throw new ArgumentException(SR.Format(SR.Arg_ResourceNameNotExist, resourceName)); 164throw new FormatException(SR.Format(SR.BadImageFormat_ResourcesNameInvalidOffset, numBytesToSkip)); 171throw new FormatException(SR.Format(SR.BadImageFormat_ResourcesDataInvalidOffset, dPos));
src\libraries\System.Private.CoreLib\src\System\Resources\ResourceReader.cs (15)
228throw new FormatException(SR.Format(SR.BadImageFormat_ResourcesNameInvalidOffset, r)); 324throw new FormatException(SR.Format(SR.BadImageFormat_ResourcesDataInvalidOffset, dataPos)); 399throw new BadImageFormatException(SR.Format(SR.BadImageFormat_ResourcesIndexTooLong, index)); 422throw new FormatException(SR.Format(SR.BadImageFormat_ResourcesDataInvalidOffset, dataOffset)); 436throw new EndOfStreamException(SR.Format(SR.BadImageFormat_ResourceNameCorrupted_NameIndex, index)); 442throw new FormatException(SR.Format(SR.BadImageFormat_ResourcesDataInvalidOffset, dataOffset)); 463throw new FormatException(SR.Format(SR.BadImageFormat_ResourcesDataInvalidOffset, dataPos)); 489throw new InvalidOperationException(SR.Format(SR.InvalidOperation_ResourceNotString_Type, FindType(typeIndex).FullName)); 502throw new InvalidOperationException(SR.Format(SR.InvalidOperation_ResourceNotString_Type, typeString)); 710throw new BadImageFormatException(SR.Format(SR.BadImageFormat_ResourceDataLengthInvalid, len)); 717throw new BadImageFormatException(SR.Format(SR.BadImageFormat_ResourceDataLengthInvalid, len)); 724throw new BadImageFormatException(SR.Format(SR.BadImageFormat_ResourceDataLengthInvalid, len)); 738throw new BadImageFormatException(SR.Format(SR.BadImageFormat_ResourceDataLengthInvalid, len)); 750throw new BadImageFormatException(SR.Format(SR.BadImageFormat_ResourceDataLengthInvalid, len)); 834throw new NotSupportedException(SR.Format(SR.NotSupported_WrongResourceReader_Type, readerType));
src\libraries\System.Private.CoreLib\src\System\Resources\ResourceSet.cs (3)
145throw new InvalidOperationException(SR.Format(SR.InvalidOperation_ResourceNotString_Name, name)); 156throw new InvalidOperationException(SR.Format(SR.InvalidOperation_ResourceNotString_Name, name)); 169throw new InvalidOperationException(SR.Format(SR.InvalidOperation_ResourceNotString_Name, name));
src\libraries\System.Private.CoreLib\src\System\Runtime\CompilerServices\ContractHelper.cs (7)
36throw new ArgumentException(SR.Format(SR.Arg_EnumIllegalVal, failureKind), nameof(failureKind)); 104return hasConditionText ? SR.Format(SR.AssertionFailed_Cnd, conditionText) : SR.AssertionFailed; 107return hasConditionText ? SR.Format(SR.AssumptionFailed_Cnd, conditionText) : SR.AssumptionFailed; 110return hasConditionText ? SR.Format(SR.PreconditionFailed_Cnd, conditionText) : SR.PreconditionFailed; 113return hasConditionText ? SR.Format(SR.PostconditionFailed_Cnd, conditionText) : SR.PostconditionFailed; 116return hasConditionText ? SR.Format(SR.InvariantFailed_Cnd, conditionText) : SR.InvariantFailed; 119return hasConditionText ? SR.Format(SR.PostconditionOnExceptionFailed_Cnd, conditionText) : SR.PostconditionOnExceptionFailed;
src\libraries\System.Private.CoreLib\src\System\Runtime\CompilerServices\SwitchExpressionException.cs (1)
62string valueMessage = SR.Format(SR.SwitchExpressionException_UnmatchedValue, UnmatchedValue);
src\libraries\System.Private.CoreLib\src\System\Runtime\Loader\AssemblyLoadContext.cs (4)
340throw new ArgumentException(SR.Format(SR.Argument_AbsolutePathRequired, assemblyPath), nameof(assemblyPath)); 358throw new ArgumentException(SR.Format(SR.Argument_AbsolutePathRequired, nativeImagePath), nameof(nativeImagePath)); 363throw new ArgumentException(SR.Format(SR.Argument_AbsolutePathRequired, assemblyPath), nameof(assemblyPath)); 444throw new ArgumentException(SR.Format(SR.Argument_AbsolutePathRequired, unmanagedDllPath), nameof(unmanagedDllPath));
src\libraries\System.Private.CoreLib\src\System\Runtime\Serialization\SerializationInfo.cs (1)
307throw new SerializationException(SR.Format(SR.Serialization_NotFound, name));
src\libraries\System.Private.CoreLib\src\System\Runtime\Serialization\SerializationInfo.SerializationGuard.cs (1)
68throw new SerializationException(SR.Format(SR.Serialization_DangerousDeserialization_Switch, SwitchPrefix + switchSuffix));
src\libraries\System.Private.CoreLib\src\System\Runtime\Versioning\VersioningHelper.cs (4)
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 (1)
722SR.Format(SR.Argument_NeverValidGenericArgument, type));
src\libraries\System.Private.CoreLib\src\System\Security\SecurityElement.cs (9)
39throw new ArgumentException(SR.Format(SR.Argument_InvalidElementTag, tag)); 49throw new ArgumentException(SR.Format(SR.Argument_InvalidElementTag, tag)); 52throw new ArgumentException(SR.Format(SR.Argument_InvalidElementText, text)); 68throw new ArgumentException(SR.Format(SR.Argument_InvalidElementTag, value)); 115throw new ArgumentException(SR.Format(SR.Argument_InvalidElementName, attrName)); 118throw new ArgumentException(SR.Format(SR.Argument_InvalidElementValue, attrValue)); 141throw new ArgumentException(SR.Format(SR.Argument_InvalidElementTag, value)); 197throw new ArgumentException(SR.Format(SR.Argument_InvalidElementName, name)); 200throw new ArgumentException(SR.Format(SR.Argument_InvalidElementValue, value));
src\libraries\System.Private.CoreLib\src\System\StartupHookProvider.cs (4)
114throw new ArgumentException(SR.Format(SR.Argument_InvalidStartupHookSimpleAssemblyName, startupHookPart)); 120throw new ArgumentException(SR.Format(SR.Argument_InvalidStartupHookSimpleAssemblyName, startupHookPart)); 130throw new ArgumentException(SR.Format(SR.Argument_InvalidStartupHookSimpleAssemblyName, startupHookPart), assemblyNameException); 163SR.Format(SR.Argument_StartupHookAssemblyLoadFailed, startupHook.Path ?? startupHook.AssemblyName!.ToString()),
src\libraries\System.Private.CoreLib\src\System\Text\DecoderFallback.cs (1)
312SR.Format(SR.Argument_RecursiveFallbackBytes,
src\libraries\System.Private.CoreLib\src\System\Text\EncoderFallback.cs (1)
357throw new ArgumentException(SR.Format(SR.Argument_RecursiveFallback, charRecursive), "chars");
src\libraries\System.Private.CoreLib\src\System\Text\Encoding.cs (4)
222throw new ArgumentException(SR.Format(SR.Argument_CodepageNotSupported, codepage), nameof(codepage)); 240string exceptionMessage = SR.Format(SR.Encoding_UTF7_Disabled, moreInfoUrl); 252throw new NotSupportedException(SR.Format(SR.NotSupported_NoCodepageData, codepage)); 334throw new NotSupportedException(SR.Format(SR.NotSupported_NoCodepageData, _codePage));
src\libraries\System.Private.CoreLib\src\System\Text\EncodingTable.cs (1)
100SR.Format(SR.Argument_EncodingNotSupported, name),
src\libraries\System.Private.CoreLib\src\System\Text\UnicodeEncoding.cs (2)
591SR.Format(SR.Argument_RecursiveFallback, charLeftOver), nameof(chars)); 929SR.Format(SR.Argument_RecursiveFallback, charLeftOver), nameof(chars));
src\libraries\System.Private.CoreLib\src\System\Threading\EventWaitHandle.cs (2)
39throw new WaitHandleCannotBeOpenedException(SR.Format(SR.Threading_WaitHandleCannotBeOpenedException_InvalidHandle, name)); 41throw new DirectoryNotFoundException(SR.Format(SR.IO_PathNotFound_Path, name));
src\libraries\System.Private.CoreLib\src\System\Threading\EventWaitHandle.Windows.cs (1)
36throw new WaitHandleCannotBeOpenedException(SR.Format(SR.Threading_WaitHandleCannotBeOpenedException_InvalidHandle, name));
src\libraries\System.Private.CoreLib\src\System\Threading\ManualResetEventSlim.cs (1)
131throw new InvalidOperationException(SR.Format(SR.ManualResetEventSlim_ctor_TooManyWaiters, NumWaitersState_MaxValue));
src\libraries\System.Private.CoreLib\src\System\Threading\Mutex.cs (2)
48throw new WaitHandleCannotBeOpenedException(SR.Format(SR.Threading_WaitHandleCannotBeOpenedException_InvalidHandle, name)); 50throw new DirectoryNotFoundException(SR.Format(SR.IO_PathNotFound_Path, name));
src\libraries\System.Private.CoreLib\src\System\Threading\Semaphore.cs (2)
41throw new WaitHandleCannotBeOpenedException(SR.Format(SR.Threading_WaitHandleCannotBeOpenedException_InvalidHandle, name)); 43throw new IOException(SR.Format(SR.IO_PathNotFound_Path, name));
src\libraries\System.Private.CoreLib\src\System\Threading\Semaphore.Windows.cs (1)
39SR.Format(SR.Threading_WaitHandleCannotBeOpenedException_InvalidHandle, name));
src\libraries\System.Private.CoreLib\src\System\ThrowHelper.cs (9)
89throw new ArgumentException(SR.Format(SR.Argument_InvalidTypeWithPointersNotSupported, targetType)); 143throw new ArgumentException(SR.Format(SR.ArgumentException_ValueTupleIncorrectType, obj.GetType()), "other"); 163throw new ArgumentException(SR.Format(SR.Arg_BogusIComparer, comparer)); 315return new ArgumentException(SR.Format(SR.Argument_AddingDuplicateWithKey, key)); 626throw new FormatException(SR.Format(SR.Format_BadBoolean, new string(value))); 632throw new ArgumentOutOfRangeException("precision", SR.Format(SR.Argument_PrecisionTooLarge, StandardFormat.MaxPrecision)); 703return new AmbiguousMatchException(SR.Format(SR.Arg_AmbiguousMatchException_Attribute, attribute)); 708return new AmbiguousMatchException(SR.Format(SR.Arg_AmbiguousMatchException_CustomAttributeData, customAttributeData)); 746return new KeyNotFoundException(SR.Format(SR.Arg_KeyNotFoundWithKey, key));
src\libraries\System.Private.CoreLib\src\System\TimeOnly.cs (1)
867case ParseFailureKind.Format_BadTimeOnly: throw new FormatException(SR.Format(SR.Format_BadTimeOnly, s.ToString()));
src\libraries\System.Private.CoreLib\src\System\TimeZoneInfo.cs (4)
616throw new SecurityException(SR.Format(SR.Security_CannotReadFileData, id), e); 618throw new TimeZoneNotFoundException(SR.Format(SR.TimeZoneNotFound_MissingData, id), e); 870throw new ArgumentException(SR.Format(SR.Argument_InvalidSerializedString, source), nameof(source)); 1131throw new SerializationException(SR.Format(SR.Serialization_CorruptField, "SupportsDaylightSavingTime"));
src\libraries\System.Private.CoreLib\src\System\TimeZoneInfo.StringSerializer.cs (2)
183throw new SerializationException(SR.Format(SR.Serialization_InvalidEscapeSequence, c)); 322throw new SerializationException(SR.Format(SR.Serialization_InvalidEscapeSequence, string.Empty));
src\libraries\System.Private.CoreLib\src\System\TimeZoneInfo.Unix.cs (1)
840throw new InvalidTimeZoneException(SR.Format(SR.InvalidTimeZone_UnparsablePosixMDateString, date.ToString()));
src\libraries\System.Private.CoreLib\src\System\TimeZoneInfo.Unix.NonAndroid.cs (1)
77e = new TimeZoneNotFoundException(SR.Format(SR.InvalidTimeZone_InvalidId, id));
src\libraries\System.Private.CoreLib\src\System\Tuple.cs (8)
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)); 1179throw new ArgumentException(SR.Format(SR.ArgumentException_TupleIncorrectType, GetType()), nameof(other));
src\libraries\System.Private.CoreLib\src\System\Type.cs (1)
296new ArgumentException(SR.Format(SR.Arg_MemberInfoNotFound, member.Name), nameof(member));
src\libraries\System.Private.CoreLib\src\System\TypedReference.cs (2)
35throw new ArgumentException(SR.Format(SR.Argument_TypedReferenceInvalidField, field.Name)); 42throw new ArgumentException(SR.Format(SR.Arg_TypeRefPrimitive, field.Name));
src\libraries\System.Private.CoreLib\src\System\TypeInitializationException.cs (1)
29: this(fullTypeName, SR.Format(SR.TypeInitialization_Type, fullTypeName), innerException)
src\libraries\System.Private.CoreLib\src\System\UnitySerializationHolder.cs (1)
52throw new ArgumentException(SR.Format(SR.Argument_InvalidUnity, _data ?? "UnityType"));
src\System\Attribute.CoreCLR.cs (1)
433SR.Format(SR.Format_AttributeUsage, type));
src\System\Reflection\Emit\CustomAttributeBuilder.cs (4)
288throw new ArgumentException(SR.Format(SR.Argument_BadParameterTypeForCAB, passedType), paramName); 434throw new ArgumentException(SR.Format(SR.Argument_InvalidTypeForCA, value.GetType())); 507throw new ArgumentException(SR.Format(SR.Argument_BadParameterTypeForCAB, ot)); 519throw new ArgumentException(SR.Format(SR.Argument_BadParameterTypeForCAB, typename));
src\System\Reflection\Emit\DynamicMethod.CoreCLR.cs (1)
78throw new InvalidOperationException(SR.Format(SR.InvalidOperation_BadEmptyMethodBody, Name));
src\System\Reflection\Emit\RuntimeAssemblyBuilder.cs (1)
45throw new ArgumentException(SR.Format(SR.Arg_EnumIllegalVal, (int)access), nameof(access));
src\System\Reflection\Emit\RuntimeGenericTypeParameterBuilder.cs (1)
200public override Type MakeGenericType(params Type[] typeArguments) { throw new InvalidOperationException(SR.Format(SR.Arg_NotGenericTypeDefinition, this)); }
src\System\Reflection\Emit\RuntimeTypeBuilder.cs (3)
286throw new ArgumentException(SR.Format(SR.Argument_ConstantNotSupported, type)); 1617throw new InvalidOperationException(SR.Format(SR.InvalidOperation_BadMethodBody, meth.Name)); 1632SR.Format(SR.InvalidOperation_BadEmptyMethodBody, meth.Name));
src\System\Reflection\RuntimeCustomAttributeData.cs (2)
521_ => throw new ArgumentException(SR.Format(SR.Arg_EnumIllegalVal, (int)encodedType), nameof(encodedType)), 541_ => throw new ArgumentException(SR.Format(SR.Arg_EnumIllegalVal, val.Byte8), nameof(val))
src\System\Reflection\RuntimeMethodInfo.CoreCLR.cs (1)
411SR.Format(SR.Arg_NotGenericMethodDefinition, this));
src\System\Reflection\RuntimeModule.cs (1)
229throw new ArgumentException(SR.Format(SR.Argument_ResolveModuleType, tk), nameof(metadataToken));
src\System\Reflection\TypeNameResolver.CoreCLR.cs (3)
172throw new FileNotFoundException(SR.Format(SR.FileNotFound_ResolveAssembly, assemblyName)); 215SR.Format(SR.TypeLoad_ResolveType, escapedTypeName) : 229throw new TypeLoadException(SR.Format(SR.TypeLoad_ResolveType, escapedTypeName));
src\System\Runtime\CompilerServices\RuntimeHelpers.CoreCLR.cs (1)
215throw new SerializationException(SR.Format(SR.Serialization_InvalidType, type));
src\System\Runtime\InteropServices\DynamicInterfaceCastableHelpers.cs (1)
34throw new InvalidOperationException(SR.Format(SR.IDynamicInterfaceCastable_NotInterface, implType.ToString()));
src\System\Runtime\InteropServices\Marshal.CoreCLR.cs (1)
44throw new ArgumentException(SR.Format(SR.Argument_OffsetOfFieldNotFound, t.FullName), nameof(fieldName));
src\System\RuntimeType.CoreCLR.cs (6)
3546throw new InvalidOperationException(SR.Format(SR.Arg_NotGenericTypeDefinition, this)); 3772throw new ArgumentException(SR.Format(SR.Acc_CreateGenericEx, this)); 3830throw new MissingMethodException(SR.Format(SR.MissingConstructor_Name, FullName)); 3849throw new MissingMethodException(SR.Format(SR.MissingConstructor_Name, FullName)); 3925throw new MissingMethodException(SR.Format(SR.Arg_NoDefCTor, this)); 3958throw new MissingMethodException(SR.Format(SR.Arg_NoDefCTor, this));
src\System\Threading\Mutex.CoreCLR.Unix.cs (2)
27throw new WaitHandleCannotBeOpenedException(SR.Format(SR.Threading_WaitHandleCannotBeOpenedException_InvalidHandle, name)); 121SR.Format(SR.Unix_SystemCallErrors, Encoding.UTF8.GetString(systemCallErrors, systemCallErrorsLength));