3705 references to ArgumentException
aspire (1)
Aspire.Confluent.Kafka (4)
Aspire.Dashboard (2)
Aspire.Hosting (9)
Aspire.Hosting.Analyzers (1)
Aspire.Hosting.Azure.AppContainers (1)
Aspire.Hosting.Azure.Tests (2)
Aspire.Hosting.Docker (1)
Aspire.Hosting.Python (2)
Aspire.Hosting.Testing (6)
DistributedApplicationHostingTestingExtensions.cs (4)
52throw new ArgumentException(string.Format(CultureInfo.InvariantCulture, Resources.ResourceDoesNotExposeConnectionStringExceptionMessage, resourceName), nameof(resourceName));
85throw new ArgumentException(string.Format(CultureInfo.InvariantCulture, Resources.ResourceNotFoundExceptionMessage, resourceName), nameof(resourceName));
96throw new ArgumentException(string.Format(CultureInfo.InvariantCulture, Resources.ResourceHasNoAllocatedEndpointsExceptionMessage, resourceName), nameof(resourceName));
111throw new ArgumentException(string.Format(CultureInfo.InvariantCulture, Resources.EndpointForResourceNotFoundExceptionMessage, endpointName, resourceName), nameof(endpointName));
Aspire.Microsoft.Data.SqlClient (3)
Aspire.Microsoft.EntityFrameworkCore.SqlServer (3)
Aspire.Playground.Tests (1)
Aspire.StackExchange.Redis (3)
Aspire.TestUtilities (1)
BoundTreeGenerator (25)
BoundNodeClassWriter.cs (25)
161throw new ArgumentException("Unexpected target language", nameof(_targetLang));
213throw new ArgumentException("Unexpected target language", nameof(_targetLang));
230throw new ArgumentException("Unexpected target language", nameof(_targetLang));
246throw new ArgumentException("Unexpected target language", nameof(_targetLang));
272throw new ArgumentException("Unexpected target language", nameof(_targetLang));
322throw new ArgumentException("Unexpected target language", nameof(_targetLang));
340throw new ArgumentException("Unexpected target language", nameof(_targetLang));
384throw new ArgumentException("Unexpected target language", nameof(_targetLang));
555throw new ArgumentException("Unexpected target language", nameof(_targetLang));
655throw new ArgumentException("Unexpected target language", nameof(_targetLang));
806throw new ArgumentException("Unexpected value", nameof(f.Null));
875throw new ArgumentException("Unexpected target language", nameof(_targetLang));
900throw new ArgumentException("Unexpected target language", nameof(_targetLang));
954throw new ArgumentException("Unexpected target language", nameof(_targetLang));
1178throw new ArgumentException("Unexpected target language", nameof(_targetLang));
1236throw new ArgumentException("Unexpected target language", nameof(_targetLang));
1364throw new ArgumentException("Unexpected target language", nameof(_targetLang));
1491throw new ArgumentException("Unexpected target language", nameof(_targetLang));
1681throw new ArgumentException("Unexpected target language", nameof(_targetLang));
1725throw new ArgumentException("Unexpected target language", nameof(_targetLang));
1757throw new ArgumentException("Unexpected target language", nameof(_targetLang));
1792throw new ArgumentException("Unexpected target language", nameof(_targetLang));
1869throw new ArgumentException("Unexpected target language", nameof(_targetLang));
1887throw new ArgumentException("Unexpected target language", nameof(_targetLang));
1902throw new ArgumentException("Unexpected target language", nameof(_targetLang));
ClientSample (2)
ConfigurationSchemaGenerator (1)
Crossgen2Tasks (1)
dotnet-dev-certs (2)
dotnet-getdocument (2)
dotnet-openapi (2)
dotnet-sql-cache (2)
dotnet-svcutil-lib (132)
FrameworkFork\Microsoft.CodeDom\Compiler\CodeValidator.cs (7)
62throw new ArgumentException(string.Format(SRCodeDom.InvalidElementType, e.GetType().FullName), "e");
99throw new ArgumentException(string.Format(SRCodeDom.InvalidElementType, e.GetType().FullName), "e");
500throw new ArgumentException(string.Format(SRCodeDom.InvalidElementType, e.GetType().FullName), "e");
710throw new ArgumentException(message, "typeName");
719throw new ArgumentException(message, "identifier");
833throw new ArgumentException(string.Format(SRCodeDom.InvalidElementType, e.GetType().FullName), "e");
1019throw new ArgumentException(string.Format(SRCodeDom.InvalidElementType, e.GetType().FullName), "e");
FrameworkFork\Microsoft.Xml\Xml\Serialization\XmlSerializationReader.cs (9)
1015throw new ArgumentException(string.Format(ResXml.XmlEmptyArrayType, CurrentTag()), "value");
1029throw new ArgumentException(ResXml.XmlInvalidArraySyntax, "value");
1037throw new ArgumentException(string.Format(ResXml.XmlInvalidArrayDimentions, CurrentTag()), "value");
1042throw new ArgumentException(ResXml.XmlMismatchedArrayBrackets, "value");
1059throw new ArgumentException(string.Format(ResXml.XmlInvalidArrayLength, lengthString), "value");
1074throw new ArgumentException(ResXml.XmlMismatchedArrayBrackets, "value");
1076throw new ArgumentException(string.Format(ResXml.XmlInvalidArrayDimentions, CurrentTag()), "value");
1078throw new ArgumentException(ResXml.XmlInvalidArraySyntax, "value");
1128throw new ArgumentException(string.Format(ResXml.XmlInvalidArrayLength, dimensions[i]), "value");
FrameworkFork\Microsoft.Xml\Xml\XmlEncoding.cs (5)
35throw new ArgumentException(string.Format(ResXml.Enc_InvalidByteInEncoding, new object[1] { -1 }), (string)null);
551throw new ArgumentException(string.Format(ResXml.Enc_InvalidByteInEncoding, new object[1] { i }), (string)null);
590throw new ArgumentException(string.Format(ResXml.Enc_InvalidByteInEncoding, new object[1] { i }), (string)null);
630throw new ArgumentException(string.Format(ResXml.Enc_InvalidByteInEncoding, new object[1] { i }), (string)null);
670throw new ArgumentException(string.Format(ResXml.Enc_InvalidByteInEncoding, new object[1] { i }), (string)null);
FrameworkFork\System.Runtime.Serialization\System\Xml\XmlBaseWriter.cs (19)
216throw /*System.Runtime.Serialization.*/DiagnosticUtility.ExceptionUtility.ThrowHelperError(new ArgumentException(string.Format(SRSerialization.XmlPrefixBoundToNamespace, "xml", xmlNamespace, ns), "ns"));
224throw /*System.Runtime.Serialization.*/DiagnosticUtility.ExceptionUtility.ThrowHelperError(new ArgumentException(string.Format(SRSerialization.XmlPrefixBoundToNamespace, "xmlns", xmlnsNamespace, ns), "ns"));
242throw /*System.Runtime.Serialization.*/DiagnosticUtility.ExceptionUtility.ThrowHelperError(new ArgumentException(string.Format(SRSerialization.XmlUndefinedPrefix, prefix), "prefix"));
249throw /*System.Runtime.Serialization.*/DiagnosticUtility.ExceptionUtility.ThrowHelperError(new ArgumentException(string.Format(SRSerialization.XmlEmptyNamespaceRequiresNullPrefix), "prefix"));
419throw /*System.Runtime.Serialization.*/DiagnosticUtility.ExceptionUtility.ThrowHelperError(new ArgumentException(string.Format(SRSerialization.XmlInvalidCommentChars), "text"));
478throw /*System.Runtime.Serialization.*/DiagnosticUtility.ExceptionUtility.ThrowHelperError(new ArgumentException(string.Format(SRSerialization.InvalidLocalNameEmpty), "localName"));
493throw /*System.Runtime.Serialization.*/DiagnosticUtility.ExceptionUtility.ThrowHelperError(new ArgumentException(string.Format(SRSerialization.XmlUndefinedPrefix, prefix), "prefix"));
523throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new ArgumentException(string.Format(SRSerialization.InvalidLocalNameEmpty), "localName"));
547throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new ArgumentException(string.Format(SRSerialization.XmlUndefinedPrefix, prefix), "prefix"));
780throw /*System.Runtime.Serialization.*/DiagnosticUtility.ExceptionUtility.ThrowHelperError(new ArgumentException(string.Format(SRSerialization.XmlNamespaceNotFound, namespaceUri), "namespaceUri"));
794throw /*System.Runtime.Serialization.*/DiagnosticUtility.ExceptionUtility.ThrowHelperError(new ArgumentException(string.Format(SRSerialization.InvalidLocalNameEmpty), "localName"));
813throw /*System.Runtime.Serialization.*/DiagnosticUtility.ExceptionUtility.ThrowHelperError(new ArgumentException(string.Format(SRSerialization.InvalidLocalNameEmpty), "localName"));
858throw /*System.Runtime.Serialization.*/DiagnosticUtility.ExceptionUtility.ThrowHelperError(new ArgumentException(string.Format(SRSerialization.XmlProcessingInstructionNotSupported), "name"));
940throw /*System.Runtime.Serialization.*/DiagnosticUtility.ExceptionUtility.ThrowHelperError(new ArgumentException(string.Format(SRSerialization.XmlOnlyWhitespace), "whitespace"));
1090throw /*System.Runtime.Serialization.*/DiagnosticUtility.ExceptionUtility.ThrowHelperError(new ArgumentException(string.Format(SRSerialization.XmlMissingLowSurrogate), "ch"));
1210throw /*System.Runtime.Serialization.*/DiagnosticUtility.ExceptionUtility.ThrowHelperError(new ArgumentException(string.Format(SRSerialization.XmlNestedArraysNotSupported), "value"));
1923throw /*System.Runtime.Serialization.*/DiagnosticUtility.ExceptionUtility.ThrowHelperError(new ArgumentException(string.Format(SRSerialization.XmlReservedPrefix), "prefix"));
1936throw /*System.Runtime.Serialization.*/DiagnosticUtility.ExceptionUtility.ThrowHelperError(new ArgumentException(string.Format(SRSerialization.XmlPrefixBoundToNamespace, prefix, nameSpace.Uri, uri), "prefix"));
1940throw /*System.Runtime.Serialization.*/DiagnosticUtility.ExceptionUtility.ThrowHelperError(new ArgumentException(string.Format(SRSerialization.XmlEmptyNamespaceRequiresNullPrefix), "prefix"));
FrameworkFork\System.ServiceModel\System\ServiceModel\Dispatcher\PrimitiveOperationFormatter.cs (2)
521new ArgumentException(string.Format(SRServiceModel.SFxParameterCountMismatch, "parts", parts.Length, "parameters", parameters.Length), "parameters"));
586new ArgumentException(string.Format(SRServiceModel.SFxParameterCountMismatch, "parts", parts.Length, "parameters", parameters.Length), "parameters"));
dotnet-user-jwts (2)
dotnet-user-secrets (2)
Extensibility.MessageInterceptor.IntegrationTests (3)
GetDocument.Insider (2)
http2cat (1)
IIS.Common.TestLib (1)
IIS.FunctionalTests (1)
IIS.LongTests (1)
IIS.NewHandler.FunctionalTests (1)
IIS.NewShim.FunctionalTests (1)
IIS.ShadowCopy.Tests (1)
IISExpress.FunctionalTests (1)
illink (3)
ILLink.RoslynAnalyzer (7)
InMemory.FunctionalTests (2)
Metrics (4)
Metrics.Legacy (4)
Microsoft.Analyzers.Local.Tests (1)
Microsoft.AspNetCore.Antiforgery (1)
Microsoft.AspNetCore.App.Analyzers (2)
Microsoft.AspNetCore.AsyncState (1)
Microsoft.AspNetCore.Authentication (1)
Microsoft.AspNetCore.Authentication.Abstractions (1)
Microsoft.AspNetCore.Authentication.OAuth (1)
Microsoft.AspNetCore.Authentication.OpenIdConnect (1)
Microsoft.AspNetCore.Components (6)
Microsoft.AspNetCore.Components.Endpoints (3)
Microsoft.AspNetCore.Components.Forms (1)
Microsoft.AspNetCore.Components.Server (3)
Microsoft.AspNetCore.Components.Server.Tests (1)
Microsoft.AspNetCore.Components.WebAssembly (2)
Microsoft.AspNetCore.Components.WebView.WindowsForms (2)
Microsoft.AspNetCore.ConcurrencyLimiter (3)
Microsoft.AspNetCore.Cors (1)
Microsoft.AspNetCore.DataProtection (4)
Microsoft.AspNetCore.DataProtection.Abstractions (5)
Microsoft.AspNetCore.DataProtection.Extensions (2)
Microsoft.AspNetCore.Diagnostics.HealthChecks (2)
Microsoft.AspNetCore.HeaderParsing (1)
Microsoft.AspNetCore.Hosting (3)
Microsoft.AspNetCore.Hosting.Abstractions (1)
Microsoft.AspNetCore.Http (1)
Microsoft.AspNetCore.Http.Abstractions (11)
Microsoft.AspNetCore.Http.Connections (3)
Microsoft.AspNetCore.Http.Connections.Client (6)
Microsoft.AspNetCore.Http.Results (1)
Microsoft.AspNetCore.HttpLogging (1)
Microsoft.AspNetCore.InternalTesting (1)
Microsoft.AspNetCore.InternalTesting.Tests (1)
Microsoft.AspNetCore.JsonPatch (1)
Microsoft.AspNetCore.JsonPatch.SystemTextJson (2)
Microsoft.AspNetCore.Mvc.Abstractions (6)
Microsoft.AspNetCore.Mvc.Core (25)
Microsoft.AspNetCore.Mvc.Core.Test (4)
Microsoft.AspNetCore.Mvc.DataAnnotations (2)
Microsoft.AspNetCore.Mvc.Formatters.Xml (2)
Microsoft.AspNetCore.Mvc.NewtonsoftJson (1)
Microsoft.AspNetCore.Mvc.Razor (3)
Microsoft.AspNetCore.Mvc.RazorPages (8)
Microsoft.AspNetCore.Mvc.TagHelpers (5)
Microsoft.AspNetCore.Mvc.TagHelpers.Test (2)
Microsoft.AspNetCore.Mvc.ViewFeatures (16)
Microsoft.AspNetCore.OutputCaching (2)
Microsoft.AspNetCore.Owin (3)
Microsoft.AspNetCore.RateLimiting (3)
Microsoft.AspNetCore.ResponseCaching (2)
Microsoft.AspNetCore.ResponseCompression (2)
Microsoft.AspNetCore.Routing (4)
Microsoft.AspNetCore.Server.HttpSys (1)
Microsoft.AspNetCore.Server.IIS (1)
Microsoft.AspNetCore.Server.Kestrel.Core (12)
Microsoft.AspNetCore.Server.Kestrel.Core.Tests (2)
Microsoft.AspNetCore.Server.Kestrel.Transport.Quic (1)
Microsoft.AspNetCore.Shared.Tests (8)
Microsoft.AspNetCore.SignalR.Tests (1)
Microsoft.AspNetCore.SpaServices.Extensions (2)
Microsoft.AspNetCore.StaticFiles (1)
Microsoft.AspNetCore.TestHost (1)
Microsoft.AspNetCore.Testing (1)
Microsoft.AspNetCore.WebUtilities (9)
Microsoft.Build (2)
Microsoft.Build.Engine.OM.UnitTests (1)
Microsoft.Build.Engine.UnitTests (1)
Microsoft.Build.Framework (13)
Microsoft.Build.Tasks.CodeAnalysis (1)
Microsoft.Build.Tasks.Core (8)
Microsoft.Build.Utilities.Core (7)
Microsoft.Cci.Extensions (3)
Microsoft.CodeAnalysis (129)
Compilation\Compilation.cs (28)
113throw new ArgumentException(CodeAnalysisResources.InconsistentSyntaxTreeFeature, nameof(trees));
235throw new ArgumentException(CodeAnalysisResources.ReturnTypeCannotBeValuePointerbyRefOrOpen, nameof(globalsType));
240throw new ArgumentException(CodeAnalysisResources.ReturnTypeCannotBeVoidByRefOrOpen, nameof(returnType));
251throw new ArgumentException(CodeAnalysisResources.TypeMustBeSameAsHostObjectTypeOfPreviousSubmission, nameof(globalsType));
275throw new ArgumentException(CodeAnalysisResources.InvalidOutputKindForSubmission, nameof(options));
284throw new ArgumentException(CodeAnalysisResources.InvalidCompilationOptions, nameof(options));
356throw new ArgumentException($"{nameof(arity)} must be >= 0", nameof(arity));
686throw new ArgumentException(string.Format(CodeAnalysisResources.ReferenceOfTypeIsInvalid1, reference.GetType()),
846throw new ArgumentException(string.Format(CodeAnalysisResources.MetadataRefNotFoundToRemove1, r),
1311throw new ArgumentException(CodeAnalysisResources.TuplesNeedAtLeastTwoElements, nameof(elementNames));
1354throw new ArgumentException(CodeAnalysisResources.TupleElementNullableAnnotationCountMismatch, nameof(elementNullableAnnotations));
1369throw new ArgumentException(CodeAnalysisResources.TupleElementNameCountMismatch, nameof(elementNames));
1376throw new ArgumentException(CodeAnalysisResources.TupleElementNameEmpty, $"{nameof(elementNames)}[{i}]");
1397throw new ArgumentException(CodeAnalysisResources.TupleElementLocationCountMismatch, nameof(elementLocations));
1644throw new ArgumentException(string.Format(CodeAnalysisResources.IsSymbolAccessibleBadWithin, nameof(within)), nameof(within));
1660throw new ArgumentException(string.Format(CodeAnalysisResources.IsSymbolAccessibleWrongAssembly, parameterName), parameterName);
2834throw new ArgumentException(CodeAnalysisResources.StreamMustSupportWrite, nameof(peStream));
2841throw new ArgumentException(CodeAnalysisResources.PdbStreamUnexpectedWhenEmbedding, nameof(pdbStream));
2846throw new ArgumentException(CodeAnalysisResources.StreamMustSupportWrite, nameof(pdbStream));
2851throw new ArgumentException(CodeAnalysisResources.PdbStreamUnexpectedWhenEmittingMetadataOnly, nameof(pdbStream));
2857throw new ArgumentException(CodeAnalysisResources.MetadataPeStreamUnexpectedWhenEmittingMetadataOnly, nameof(metadataPEStream));
2862throw new ArgumentException(CodeAnalysisResources.IncludingPrivateMembersUnexpectedWhenEmittingToMetadataPeStream, nameof(metadataPEStream));
2874throw new ArgumentException(CodeAnalysisResources.EmbeddingPdbUnexpectedWhenEmittingMetadata, nameof(metadataPEStream));
2881throw new ArgumentException(CodeAnalysisResources.CannotTargetNetModuleWhenEmittingRefAssembly, nameof(metadataPEStream));
2885throw new ArgumentException(CodeAnalysisResources.CannotTargetNetModuleWhenEmittingRefAssembly, nameof(options.EmitMetadataOnly));
2893throw new ArgumentException(CodeAnalysisResources.StreamMustSupportReadAndSeek, nameof(win32Resources));
2899throw new ArgumentException(CodeAnalysisResources.StreamMustSupportRead, nameof(sourceLinkStream));
2907throw new ArgumentException(CodeAnalysisResources.EmbeddedTextsRequirePdb, nameof(embeddedTexts));
DiagnosticAnalyzer\CompilationWithAnalyzers.cs (10)
137throw new ArgumentException(CodeAnalysisResources.ArgumentCannotBeEmpty, nameof(analyzers));
142throw new ArgumentException(CodeAnalysisResources.ArgumentElementCannotBeNull, nameof(analyzers));
148throw new ArgumentException(CodeAnalysisResources.DuplicateAnalyzerInstances, nameof(analyzers));
158throw new ArgumentException(CodeAnalysisResources.UnsupportedAnalyzerInstance, nameof(analyzer));
166throw new ArgumentException(CodeAnalysisResources.ArgumentCannotBeEmpty, nameof(analyzer));
176throw new ArgumentException(CodeAnalysisResources.UnsupportedAnalyzerInstance, nameof(_analyzers));
182throw new ArgumentException(CodeAnalysisResources.DuplicateAnalyzerInstances, nameof(analyzers));
195throw new ArgumentException(CodeAnalysisResources.InvalidTree, nameof(model));
208throw new ArgumentException(CodeAnalysisResources.InvalidTree, nameof(tree));
221throw new ArgumentException(CodeAnalysisResources.InvalidAdditionalFile, nameof(file));
DiagnosticAnalyzer\DiagnosticAnalysisContextHelpers.cs (7)
63throw new ArgumentException(string.Format(CodeAnalysisResources.UnsupportedDiagnosticReported, diagnostic.Id), nameof(diagnostic));
71throw new ArgumentException(string.Format(CodeAnalysisResources.InvalidDiagnosticIdReported, diagnostic.Id), nameof(diagnostic));
99throw new ArgumentException(string.Format(CodeAnalysisResources.InvalidDiagnosticLocationReported, id, location.SourceTree.FilePath), "diagnostic");
105throw new ArgumentException(string.Format(CodeAnalysisResources.InvalidDiagnosticSpanReported, id, location.SourceSpan, location.SourceTree.FilePath), "diagnostic");
126throw new ArgumentException(CodeAnalysisResources.ArgumentCannotBeEmpty, nameof(symbolKinds));
140throw new ArgumentException(CodeAnalysisResources.ArgumentCannotBeEmpty, nameof(syntaxKinds));
153throw new ArgumentException(CodeAnalysisResources.ArgumentCannotBeEmpty, nameof(operationKinds));
SourceGeneration\AdditionalSourcesCollection.cs (5)
64throw new ArgumentException(string.Format(CodeAnalysisResources.HintNameInvalidChar, hintName, c, i), nameof(hintName));
72throw new ArgumentException(string.Format(CodeAnalysisResources.HintNameInvalidSegment, hintName, match.Value, match.Index), nameof(hintName));
78throw new ArgumentException(string.Format(CodeAnalysisResources.HintNameUniquePerGenerator, hintName), nameof(hintName));
83throw new ArgumentException(string.Format(CodeAnalysisResources.SourceTextRequiresEncoding, hintName), nameof(source));
129throw new ArgumentException(string.Format(CodeAnalysisResources.HintNameUniquePerGenerator, source.HintName), "hintName");
Microsoft.CodeAnalysis.Analyzers (4)
Microsoft.CodeAnalysis.Analyzers.UnitTests (4)
Microsoft.CodeAnalysis.AnalyzerUtilities (9)
Microsoft.CodeAnalysis.BannedApiAnalyzers (4)
Microsoft.CodeAnalysis.CodeStyle (19)
Microsoft.CodeAnalysis.CodeStyle.Fixes (7)
Microsoft.CodeAnalysis.Collections.Package (13)
Microsoft.CodeAnalysis.CSharp (45)
Compilation\CSharpCompilation.cs (21)
546throw new ArgumentException(CodeAnalysisResources.InconsistentLanguageVersions, nameof(syntaxTrees));
874throw new ArgumentException(CSharpResources.TreeMustHaveARootNodeWith, $"{nameof(trees)}[{i}]");
879throw new ArgumentException(CSharpResources.SyntaxTreeAlreadyPresent, $"{nameof(trees)}[{i}]");
884throw new ArgumentException(CSharpResources.SubmissionCanOnlyInclude, $"{nameof(trees)}[{i}]");
896throw new ArgumentException(CSharpResources.SubmissionCanHaveAtMostOne, nameof(trees));
947throw new ArgumentException(CSharpResources.SyntaxTreeFromLoadNoRemoveReplace, $"{nameof(trees)}[{i}]");
950throw new ArgumentException(CSharpResources.SyntaxTreeNotFoundToRemove, $"{nameof(trees)}[{i}]");
1004throw new ArgumentException(CSharpResources.TreeMustHaveARootNodeWith, nameof(newTree));
1015throw new ArgumentException(CSharpResources.SyntaxTreeFromLoadNoRemoveReplace, nameof(oldTree));
1018throw new ArgumentException(CSharpResources.SyntaxTreeNotFoundToRemove, nameof(oldTree));
1023throw new ArgumentException(CSharpResources.SyntaxTreeAlreadyPresent, nameof(newTree));
2523throw new ArgumentException(CSharpResources.SyntaxTreeNotFound, nameof(syntaxTree));
4196throw new ArgumentException(CodeAnalysisResources.TupleUnderlyingTypeMustBeTupleCompatible, nameof(underlyingType));
4265throw new ArgumentException(string.Format(CodeAnalysisResources.BadBuiltInOps1, name), nameof(name));
4269throw new ArgumentException(string.Format(CodeAnalysisResources.BadBuiltInOps3, name), nameof(name));
4491throw new ArgumentException(string.Format(CodeAnalysisResources.BadBuiltInOps1, name), nameof(name));
4495throw new ArgumentException(string.Format(CodeAnalysisResources.BadBuiltInOps3, name), nameof(name));
4613throw new ArgumentException(CSharpResources.NoNoneSearchCriteria, nameof(filter));
4631throw new ArgumentException(CSharpResources.NoNoneSearchCriteria, nameof(filter));
4652throw new ArgumentException(CSharpResources.NoNoneSearchCriteria, nameof(filter));
4678throw new ArgumentException(CSharpResources.NoNoneSearchCriteria, nameof(filter));
Microsoft.CodeAnalysis.CSharp.CodeStyle (1)
Microsoft.CodeAnalysis.CSharp.CodeStyle.Fixes (1)
Microsoft.CodeAnalysis.CSharp.EditorFeatures2.UnitTests (1)
Microsoft.CodeAnalysis.CSharp.Emit3.UnitTests (6)
Microsoft.CodeAnalysis.CSharp.Test.Utilities (1)
Microsoft.CodeAnalysis.CSharp.Workspaces (3)
Microsoft.CodeAnalysis.EditorFeatures (5)
Microsoft.CodeAnalysis.EditorFeatures.Test.Utilities (3)
Microsoft.CodeAnalysis.EditorFeatures.Text (1)
Microsoft.CodeAnalysis.EditorFeatures.UnitTests (1)
Microsoft.CodeAnalysis.ExpressionEvaluator.ResultProvider (1)
Microsoft.CodeAnalysis.ExpressionEvaluator.ResultProvider.Utilities (2)
Microsoft.CodeAnalysis.ExternalAccess.FSharp (2)
Microsoft.CodeAnalysis.Features (10)
Diagnostics\Service\DocumentAnalysisExecutor_Helpers.cs (3)
156throw new ArgumentException(string.Format(FeaturesResources.Reported_diagnostic_0_has_a_source_location_in_file_1_which_is_not_part_of_the_compilation_being_analyzed, id, location.SourceTree.FilePath), "diagnostic");
162throw new ArgumentException(string.Format(FeaturesResources.Reported_diagnostic_0_has_a_source_location_1_in_file_2_which_is_outside_of_the_given_file, id, location.SourceSpan, location.SourceTree.FilePath), "diagnostic");
185throw new ArgumentException(string.Format(FeaturesResources.Reported_diagnostic_0_has_a_source_location_1_in_file_2_which_is_outside_of_the_given_file, id, location.SourceSpan, filePath), "diagnostic");
Microsoft.CodeAnalysis.InteractiveHost (14)
Microsoft.CodeAnalysis.LanguageServer (1)
Microsoft.CodeAnalysis.LanguageServer.Protocol (4)
Microsoft.CodeAnalysis.PublicApiAnalyzers (4)
Microsoft.CodeAnalysis.Rebuild (2)
Microsoft.CodeAnalysis.ResxSourceGenerator (4)
Microsoft.CodeAnalysis.Scripting (11)
Microsoft.CodeAnalysis.Test.Utilities (8)
Microsoft.CodeAnalysis.Threading.Package (13)
Microsoft.CodeAnalysis.UnitTests (10)
Diagnostics\OperationTests.cs (7)
158Assert.Equal(new ArgumentException(argumentExceptionMessage, "body").Message, ex.Message);
176Assert.Equal(new ArgumentException(argumentExceptionMessage, "initializer").Message, ex.Message);
194Assert.Equal(new ArgumentException(argumentExceptionMessage, "initializer").Message, ex.Message);
212Assert.Equal(new ArgumentException(argumentExceptionMessage, "initializer").Message, ex.Message);
234Assert.Equal(new ArgumentException(argumentExceptionMessage, "constructorBody").Message, ex.Message);
254Assert.Equal(new ArgumentException(argumentExceptionMessage, "methodBody").Message, ex.Message);
315Assert.Equal(ex.Message, new ArgumentException(CodeAnalysisResources.NotARootOperation, "operation").Message);
Microsoft.CodeAnalysis.Workspaces (69)
Microsoft.CodeAnalysis.Workspaces.MSBuild (1)
Microsoft.CodeAnalysis.Workspaces.MSBuild.BuildHost (17)
Microsoft.CodeAnalysis.Workspaces.Test.Utilities (1)
Microsoft.CommonLanguageServerProtocol.Framework.Package (2)
Microsoft.CSharp (2)
Microsoft.Data.Analysis (76)
DataFrame.BinaryOperations.cs (14)
20throw new ArgumentException(Strings.MismatchedColumnLengths, nameof(values));
59throw new ArgumentException(Strings.MismatchedColumnLengths, nameof(values));
98throw new ArgumentException(Strings.MismatchedColumnLengths, nameof(values));
137throw new ArgumentException(Strings.MismatchedColumnLengths, nameof(values));
176throw new ArgumentException(Strings.MismatchedColumnLengths, nameof(values));
214throw new ArgumentException(Strings.MismatchedColumnLengths, nameof(values));
251throw new ArgumentException(Strings.MismatchedColumnLengths, nameof(values));
288throw new ArgumentException(Strings.MismatchedColumnLengths, nameof(values));
362throw new ArgumentException(Strings.MismatchedColumnLengths, nameof(values));
395throw new ArgumentException(Strings.MismatchedColumnLengths, nameof(values));
428throw new ArgumentException(Strings.MismatchedColumnLengths, nameof(values));
461throw new ArgumentException(Strings.MismatchedColumnLengths, nameof(values));
494throw new ArgumentException(Strings.MismatchedColumnLengths, nameof(values));
527throw new ArgumentException(Strings.MismatchedColumnLengths, nameof(values));
DataFrame.cs (7)
339throw new ArgumentException(string.Format(Strings.ExceedsNumberOfRows, Rows.Count), nameof(numberOfRows));
371throw new ArgumentException(String.Format(Strings.InvalidColumnName, columnName), nameof(columnName));
484throw new ArgumentException(Strings.MismatchedColumnLengths, nameof(values));
566throw new ArgumentException(string.Format(Strings.MismatchedValueType, column.DataType), column.Name);
575throw new ArgumentException(string.Format(Strings.ExceedsNumberOfColumns, Columns.Count), nameof(row));
631throw new ArgumentException(String.Format(Strings.InvalidColumnName, columnName), nameof(columnName));
641throw new ArgumentException(string.Format(Strings.MismatchedValueType, column.DataType), column.Name);
DataFrameColumnCollection.cs (6)
82throw new ArgumentException(Strings.MismatchedColumnLengths, nameof(column));
87throw new ArgumentException(string.Format(Strings.DuplicateColumnName, column.Name), nameof(column));
108throw new ArgumentException(Strings.MismatchedColumnLengths, nameof(column));
113throw new ArgumentException(string.Format(Strings.DuplicateColumnName, column.Name), nameof(column));
188throw new ArgumentException(String.Format(Strings.InvalidColumnName, columnName), nameof(columnName));
223throw new ArgumentException(string.Format(Strings.BadColumnCast, column.DataType, typeof(T)), nameof(T));
DataFrameColumns\StringDataFrameColumn.cs (5)
60throw new ArgumentException(Strings.CannotResizeDown, nameof(length));
153throw new ArgumentException(string.Format(Strings.MismatchedValueType, typeof(string)), nameof(value));
307throw new ArgumentException(String.Format(Strings.MultipleMismatchedValueType, typeof(long), typeof(int), typeof(bool)), nameof(mapIndices));
329throw new ArgumentException(Strings.MapIndicesExceedsColumnLength, nameof(boolColumn));
467throw new ArgumentException(String.Format(Strings.MismatchedValueType, typeof(string)), nameof(value));
PrimitiveDataFrameColumn.cs (15)
136throw new ArgumentException(Strings.SpansMultipleBuffers, nameof(numberOfRows));
245throw new ArgumentException(string.Format(Strings.MismatchedValueType, DataType), nameof(value));
430throw new ArgumentException(String.Format(Strings.MultipleMismatchedValueType, typeof(long), typeof(int), typeof(bool)), nameof(mapIndices));
463throw new ArgumentException(Strings.MapIndicesExceedsColumnLength, nameof(boolColumn));
479throw new ArgumentException(String.Format(Strings.MismatchedValueType, Strings.NumericColumnType), nameof(mapIndices));
720throw new ArgumentException(string.Format(Strings.MismatchedValueType, typeof(T)), nameof(U));
750throw new ArgumentException(string.Format(Strings.MismatchedValueType, typeof(T)), nameof(U));
957throw new ArgumentException(Strings.MismatchedColumnLengths, nameof(column));
987throw new ArgumentException(string.Format(Strings.MismatchedColumnValueType, typeof(T)), nameof(column));
1022throw new ArgumentException(string.Format(Strings.MismatchedColumnValueType, typeof(T)), nameof(column));
1065throw new ArgumentException(string.Format(Strings.MismatchedValueType, typeof(T)), nameof(value));
1100throw new ArgumentException(string.Format(Strings.MismatchedValueType, typeof(T)), nameof(value));
1142throw new ArgumentException(string.Format(Strings.MismatchedValueType, typeof(T)), nameof(value));
1176throw new ArgumentException(string.Format(Strings.MismatchedValueType, typeof(T)), nameof(value));
1284throw new ArgumentException(Strings.MismatchedColumnLengths, nameof(column));
Microsoft.DotNet.AsmDiff (2)
Microsoft.DotNet.Build.Tasks.Feed (2)
Microsoft.DotNet.Build.Tasks.Installers (3)
Microsoft.DotNet.Build.Tasks.Packaging (1)
Microsoft.DotNet.GenFacades (1)
Microsoft.DotNet.Helix.Client (4)
Microsoft.DotNet.Helix.JobSender (2)
Microsoft.DotNet.Internal.SymbolHelper (3)
Microsoft.DotNet.RemoteExecutor (2)
Microsoft.DotNet.SignCheckLibrary (1)
Microsoft.DotNet.SwaggerGenerator.CodeGenerator (1)
Microsoft.DotNet.XliffTasks (3)
Microsoft.DotNet.XUnitAssert.Tests (6)
Microsoft.Extensions.AI (1)
Microsoft.Extensions.AI.Abstractions (1)
Microsoft.Extensions.AI.AzureAIInference (1)
Microsoft.Extensions.AI.Evaluation (1)
Microsoft.Extensions.AI.Evaluation.Console (1)
Microsoft.Extensions.AI.Evaluation.Quality (1)
Microsoft.Extensions.AI.Evaluation.Reporting (1)
Microsoft.Extensions.AI.Evaluation.Reporting.Azure (1)
Microsoft.Extensions.AI.Evaluation.Safety (1)
Microsoft.Extensions.AI.Integration.Tests (1)
Microsoft.Extensions.AI.Ollama (1)
Microsoft.Extensions.AI.OpenAI (3)
Microsoft.Extensions.AI.Tests (1)
Microsoft.Extensions.AmbientMetadata.Application (1)
Microsoft.Extensions.AsyncState (1)
Microsoft.Extensions.Caching.Abstractions (1)
Microsoft.Extensions.Caching.Hybrid (3)
Microsoft.Extensions.Compliance.Abstractions (2)
Microsoft.Extensions.Compliance.Redaction (1)
Microsoft.Extensions.Compliance.Testing (1)
Microsoft.Extensions.Configuration (1)
Microsoft.Extensions.Configuration.CommandLine (2)
Microsoft.Extensions.Configuration.Ini (1)
Microsoft.Extensions.Configuration.Json (1)
Microsoft.Extensions.Configuration.UserSecrets (2)
Microsoft.Extensions.Configuration.Xml (1)
Microsoft.Extensions.DependencyInjection (2)
Microsoft.Extensions.DependencyInjection.Abstractions (1)
Microsoft.Extensions.DependencyInjection.AutoActivation (1)
Microsoft.Extensions.DependencyModel (14)
Microsoft.Extensions.Diagnostics.ExceptionSummarization (1)
Microsoft.Extensions.Diagnostics.HealthChecks (4)
Microsoft.Extensions.Diagnostics.HealthChecks.Common (1)
Microsoft.Extensions.Diagnostics.Probes (1)
Microsoft.Extensions.Diagnostics.ResourceMonitoring (1)
Microsoft.Extensions.Diagnostics.Testing (1)
Microsoft.Extensions.FileProviders.Physical (1)
Microsoft.Extensions.Hosting (1)
Microsoft.Extensions.Hosting.Testing (1)
Microsoft.Extensions.Http (2)
Microsoft.Extensions.Http.Resilience (1)
Microsoft.Extensions.Identity.Core (3)
Microsoft.Extensions.Logging (1)
Microsoft.Extensions.ObjectPool.DependencyInjection (1)
Microsoft.Extensions.Options.Contextual (1)
Microsoft.Extensions.Resilience (1)
Microsoft.Extensions.ServiceDiscovery (1)
Microsoft.Extensions.Telemetry (1)
Microsoft.Extensions.Telemetry.Abstractions (1)
Microsoft.Extensions.TimeProvider.Testing (1)
Microsoft.Interop.SourceGeneration (3)
Microsoft.JSInterop (1)
Microsoft.Maui (18)
Microsoft.Maui.Controls (30)
HybridWebView\HybridWebView.cs (8)
92 throw new ArgumentException($"The method name cannot be null or empty.", nameof(methodName));
96 throw new ArgumentException($"The parameter values were provided, but the parameter JSON type infos were not.", nameof(paramJsonTypeInfos));
100 throw new ArgumentException($"The parameter JSON type infos were provided, but the parameter values were not.", nameof(paramValues));
104 throw new ArgumentException($"The number of parameter values does not match the number of parameter JSON type infos.", nameof(paramValues));
121 throw new ArgumentException($"The method name cannot be null or empty.", nameof(methodName));
125 throw new ArgumentException($"The parameter values were provided, but the parameter JSON type infos were not.", nameof(paramJsonTypeInfos));
129 throw new ArgumentException($"The parameter JSON type infos were provided, but the parameter values were not.", nameof(paramValues));
133 throw new ArgumentException($"The number of parameter values does not match the number of parameter JSON type infos.", nameof(paramValues));
Microsoft.Maui.Controls.BindingSourceGen (1)
Microsoft.Maui.Controls.Xaml (1)
Microsoft.Maui.Essentials (2)
Microsoft.ML.AutoML (12)
Utils\UserInputValidationUtil.cs (12)
57throw new ArgumentException($"{nameof(numberOfCVFolds)} must be at least 2", nameof(numberOfCVFolds));
65throw new ArgumentException($"If provided, {nameof(samplingKeyColumnName)} must be the same as {nameof(groupIdColumnName)} for Ranking Experiments", samplingKeyColumnName);
78throw new ArgumentException("Training data has 0 rows", nameof(trainData));
85throw new ArgumentException($"{DefaultColumnNames.Features} column must be of data type {NumberDataViewType.Single}", nameof(trainData));
97throw new ArgumentException($"Only supported feature column types are " +
144throw new ArgumentException($"Duplicate column name {duplicateColName} is present in two or more distinct properties of provided column information", nameof(columnInformation));
175throw new ArgumentException($"File '{path}' does not exist", nameof(path));
180throw new ArgumentException($"File at path '{path}' cannot be empty", nameof(path));
193throw new ArgumentException("Validation data has 0 rows", nameof(validationData));
200throw new ArgumentException($"{schemaMismatchError} Train data has '{trainData.Schema.Count}' columns," +
217throw new ArgumentException($"{schemaMismatchError} Column '{trainCol.Name}' exists in train data, but not in validation data.", nameof(validationData));
222throw new ArgumentException($"{schemaMismatchError} Column '{trainCol.Name}' is of type {trainCol.Type} in train data, and type " +
Microsoft.ML.AutoML.Tests (2)
Microsoft.ML.CodeGenerator (1)
Microsoft.ML.Core (2)
Microsoft.ML.DataView (4)
Microsoft.ML.GenAI.Core (3)
Microsoft.ML.GenAI.Phi (1)
Microsoft.ML.ImageAnalytics (8)
MLImage.cs (8)
46throw new ArgumentException($"Invalid input stream contents", nameof(imageStream));
67throw new ArgumentException($"Invalid path", nameof(imagePath));
85throw new ArgumentException($"Unsupported pixel format", nameof(pixelFormat));
90throw new ArgumentException($"Invalid width value.", nameof(width));
95throw new ArgumentException($"Invalid height value.", nameof(height));
236throw new ArgumentException($"Path has invalid image file extension.", nameof(imagePath));
242throw new ArgumentException($"Saving image with the format '{ext}' is not supported. Try save it with `Jpeg`, `Png`, or `Webp` format.", nameof(imagePath));
297_ => throw new ArgumentException($"Invalid resize mode value.", nameof(mode))
Microsoft.ML.TestFramework (1)
Microsoft.ML.TestFrameworkCommon (4)
Microsoft.ML.Tokenizers (6)
Microsoft.ML.Transforms (1)
Microsoft.Net.Http.Headers (6)
Microsoft.VisualStudio.LanguageServices (6)
Microsoft.VisualStudio.LanguageServices.CSharp (3)
Microsoft.VisualStudio.LanguageServices.CSharp.UnitTests (1)
Microsoft.Web.Xdt.Extensions (2)
MSBuild (1)
MSBuildTaskHost (1)
PresentationCore (259)
MS\Internal\Ink\InkSerializedFormat\CustomAttributeSerializer.cs (18)
420throw new ArgumentException(SR.InvalidSizeSpecified, nameof(cbSize));
430throw new ArgumentException(StrokeCollectionSerializer.ISFDebugMessage("Custom Attribute tag embedded in ISF stream does not match guid table"), nameof(tag));
437throw new ArgumentException(SR.InvalidSizeSpecified, nameof(cbSize));
457throw new ArgumentException(StrokeCollectionSerializer.ISFDebugMessage("Read different size from stream then expected"), nameof(cbSize));
478throw new ArgumentException(StrokeCollectionSerializer.ISFDebugMessage("Read different size from stream then expected"), nameof(cbSize));
780throw new ArgumentException(SR.Format(SR.InvalidValueType, typeof(System.Windows.Media.Color)), nameof(value));
788throw new ArgumentException(SR.Format(SR.InvalidValueType, typeof(int)), nameof(value));
796throw new ArgumentException(SR.Format(SR.InvalidValueType, typeof(DrawingFlags)), nameof(value));
807throw new ArgumentException(SR.Format(SR.InvalidValueType1, typeof(StylusTip), typeof(int)), nameof(value));
811throw new ArgumentException(SR.Format(SR.InvalidValueOfType, value, typeof(StylusTip)), nameof(value));
822throw new ArgumentException(SR.Format(SR.InvalidValueType1, typeof(String), typeof(Matrix)), nameof(value));
829throw new ArgumentException(SR.MatrixNotInvertible, nameof(value));
833throw new ArgumentException(SR.InvalidMatrixContainsNaN, nameof(value));
837throw new ArgumentException(SR.InvalidMatrixContainsInfinity, nameof(value));
845throw new ArgumentException(SR.Format(SR.InvalidValueType, typeof(bool)), nameof(value));
852throw new ArgumentException(SR.Format(SR.InvalidValueType, typeof(double)), nameof(value));
876throw new ArgumentException(SR.Format(SR.InvalidValueType, typeof(byte)), nameof(value));
889throw new ArgumentException(SR.Format(SR.InvalidValueType, typeof(byte[])), nameof(value));
MS\Internal\Ink\InkSerializedFormat\InkSerializer.cs (42)
208throw new ArgumentException(ISFDebugMessage("Invalid ISF data"), nameof(isfStream));
222throw new ArgumentException(StrokeCollectionSerializer.ISFDebugMessage("Read different size from stream then expected"), nameof(isfStream));
227throw new ArgumentException(ISFDebugMessage("Invalid ISF data"), nameof(isfStream));
385throw new ArgumentException(ISFDebugMessage("Invalid ISF data"), nameof(inputStream));
741throw new ArgumentException(StrokeCollectionSerializer.ISFDebugMessage("Global Custom Attribute tag embedded in ISF stream does not match guid table"), "inkdata");
751throw new ArgumentException(ISFDebugMessage("Invalid ISF data"), "inkdata");
798throw new ArgumentException(ISFDebugMessage("Invalid ISF data"), "inkdata");
829throw new ArgumentException(ISFDebugMessage("Invalid ISF data"),nameof(strm));
834throw new ArgumentException(ISFDebugMessage("Invalid ISF data"),nameof(strm));
849throw new ArgumentException(ISFDebugMessage("Invalid ISF data"),nameof(strm));
859throw new ArgumentException(ISFDebugMessage("Invalid ISF data"),nameof(strm));
891throw new ArgumentException(ISFDebugMessage("Invalid ISF data"),nameof(strm));
904throw new ArgumentException(ISFDebugMessage("Invalid ISF data"),nameof(strm));
914throw new ArgumentException(ISFDebugMessage("Invalid ISF data"),nameof(strm));
931throw new ArgumentException(ISFDebugMessage("Invalid ISF data"),nameof(strm));
940throw new ArgumentException(ISFDebugMessage("Invalid ISF data"),nameof(strm));
963throw new ArgumentException(ISFDebugMessage("Invalid ISF data"),nameof(strm));
993throw new ArgumentException(ISFDebugMessage("Invalid ISF data"),nameof(strm));
998throw new ArgumentException(ISFDebugMessage("Invalid ISF data"),nameof(strm));
1006throw new ArgumentException(ISFDebugMessage("Invalid ISF data"),nameof(strm));
1016throw new ArgumentException(ISFDebugMessage("Invalid ISF data"),nameof(strm));
1048throw new ArgumentException(ISFDebugMessage("Invalid ISF data"),nameof(strm));
1057throw new ArgumentException(ISFDebugMessage("Invalid ISF data"),nameof(strm));
1065throw new ArgumentException(ISFDebugMessage("Invalid ISF data"),nameof(strm));
1097throw new ArgumentException(ISFDebugMessage("Invalid ISF data"),nameof(strm));
1105throw new ArgumentException(ISFDebugMessage("Invalid ISF data"),nameof(strm));
1133throw new ArgumentException(ISFDebugMessage("Invalid ISF data"),nameof(strm));
1171throw new ArgumentException(ISFDebugMessage("Invalid ISF data"),nameof(strm));
1192throw new ArgumentException(ISFDebugMessage("Invalid ISF data"),nameof(strm));
1262throw new ArgumentException(ISFDebugMessage("Invalid ISF data"),nameof(strm));
1297throw new ArgumentException(ISFDebugMessage("Invalid ISF data"),nameof(strm));
1331throw new ArgumentException(ISFDebugMessage("Invalid ISF data"),nameof(strm));
1337throw new ArgumentException(ISFDebugMessage("Invalid ISF data"),nameof(strm));
1342throw new ArgumentException(ISFDebugMessage("Invalid ISF data"),nameof(strm));
1348throw new ArgumentException(ISFDebugMessage("Invalid ISF data"),nameof(strm));
1353throw new ArgumentException(ISFDebugMessage("Invalid ISF data"),nameof(strm));
1359throw new ArgumentException(ISFDebugMessage("Invalid ISF data"),nameof(strm));
1364throw new ArgumentException(ISFDebugMessage("Invalid ISF data"),nameof(strm));
1370throw new ArgumentException(ISFDebugMessage("Invalid ISF data"),nameof(strm));
1587throw new ArgumentException(StrokeCollectionSerializer.ISFDebugMessage("Button guid tag embedded in ISF stream does not match guid table"),nameof(strd));
1603throw new ArgumentException(StrokeCollectionSerializer.ISFDebugMessage("Invalid ISF with NoX or NoY specified"), nameof(strd));
1627throw new ArgumentException(StrokeCollectionSerializer.ISFDebugMessage("Packet Description Property tag embedded in ISF stream does not match guid table"), nameof(strd));
System\Windows\Generated\ContentElement.cs (4)
71throw new ArgumentException(SR.Format(SR.Animation_DependencyPropertyIsNotAnimatable, dp.Name, this.GetType()), nameof(dp));
77throw new ArgumentException(SR.Format(SR.Animation_AnimationTimelineTypeMismatch, clock.Timeline.GetType(), dp.Name, dp.PropertyType), nameof(clock));
136throw new ArgumentException(SR.Format(SR.Animation_DependencyPropertyIsNotAnimatable, dp.Name, this.GetType()), nameof(dp));
142throw new ArgumentException(SR.Format(SR.Animation_AnimationTimelineTypeMismatch, animation.GetType(), dp.Name, dp.PropertyType), nameof(animation));
System\Windows\Generated\UIElement.cs (4)
71throw new ArgumentException(SR.Format(SR.Animation_DependencyPropertyIsNotAnimatable, dp.Name, this.GetType()), nameof(dp));
77throw new ArgumentException(SR.Format(SR.Animation_AnimationTimelineTypeMismatch, clock.Timeline.GetType(), dp.Name, dp.PropertyType), nameof(clock));
136throw new ArgumentException(SR.Format(SR.Animation_DependencyPropertyIsNotAnimatable, dp.Name, this.GetType()), nameof(dp));
142throw new ArgumentException(SR.Format(SR.Animation_AnimationTimelineTypeMismatch, animation.GetType(), dp.Name, dp.PropertyType), nameof(animation));
System\Windows\Ink\StrokeCollection.cs (13)
47throw new ArgumentException(SR.StrokeIsDuplicated, nameof(strokes));
60throw new ArgumentException(SR.Image_StreamRead, nameof(stream));
66throw new ArgumentException(SR.Invalid_isfData_Length, nameof(stream));
84throw new ArgumentException(SR.Image_StreamWrite, nameof(stream));
187throw new ArgumentException(SR.InvalidGuid, nameof(propertyDataId));
225throw new ArgumentException(SR.MatrixNotInvertible, nameof(transformMatrix));
309throw new ArgumentException(SR.StrokeIsDuplicated, nameof(stroke));
327throw new ArgumentException(SR.StrokeIsDuplicated, nameof(stroke));
383ArgumentException ae = new ArgumentException(SR.InvalidRemovedStroke, nameof(strokes));
427throw new ArgumentException(SR.StrokeIsDuplicated, nameof(strokes));
475ArgumentException ae = new ArgumentException(SR.EmptyScToReplace, nameof(strokesToReplace));
488ArgumentException ae = new ArgumentException(SR.InvalidRemovedStroke, nameof(strokesToReplace));
504throw new ArgumentException(SR.StrokeIsDuplicated, nameof(strokesToReplaceWith));
System\Windows\Media\Animation\Generated\Animatable.cs (4)
70throw new ArgumentException(SR.Format(SR.Animation_DependencyPropertyIsNotAnimatable, dp.Name, this.GetType()), nameof(dp));
76throw new ArgumentException(SR.Format(SR.Animation_AnimationTimelineTypeMismatch, clock.Timeline.GetType(), dp.Name, dp.PropertyType), nameof(clock));
135throw new ArgumentException(SR.Format(SR.Animation_DependencyPropertyIsNotAnimatable, dp.Name, this.GetType()), nameof(dp));
141throw new ArgumentException(SR.Format(SR.Animation_AnimationTimelineTypeMismatch, animation.GetType(), dp.Name, dp.PropertyType), nameof(animation));
System\Windows\Media\GlyphRun.cs (12)
384throw new ArgumentException(SR.ClusterMapEntriesShouldNotDecrease, nameof(clusterMap));
387throw new ArgumentException(SR.ClusterMapEntryShouldPointWithinGlyphIndices, nameof(clusterMap));
393throw new ArgumentException(SR.ClusterMapFirstEntryMustBeZero, nameof(clusterMap));
398throw new ArgumentException(SR.Format(SR.CollectionNumberOfElementsShouldBeEqualTo, characters.Count), nameof(clusterMap));
404throw new ArgumentException(SR.Format(SR.CollectionNumberOfElementsShouldBeEqualTo, GlyphCount), nameof(clusterMap));
411throw new ArgumentException(SR.Format(SR.CollectionNumberOfElementsShouldBeEqualTo, CodepointCount + 1), nameof(caretStops));
433throw new ArgumentException(SR.CollectionNumberOfElementsMustBeGreaterThanZero, nameof(glyphIndices));
437throw new ArgumentException(SR.Format(SR.CollectionNumberOfElementsMustBeLessOrEqualTo, MaxGlyphCount), nameof(glyphIndices));
443throw new ArgumentException(SR.Format(SR.CollectionNumberOfElementsShouldBeEqualTo, glyphIndices.Count), nameof(advanceWidths));
446throw new ArgumentException(SR.Format(SR.CollectionNumberOfElementsShouldBeEqualTo, glyphIndices.Count), nameof(glyphOffsets));
1084throw new ArgumentException(SR.CollectionNumberOfElementsMustBeGreaterThanZero, nameof(value));
1114throw new ArgumentException(SR.CollectionNumberOfElementsMustBeGreaterThanZero, nameof(value));
System\Windows\Media3D\Generated\Visual3D.cs (4)
70throw new ArgumentException(SR.Format(SR.Animation_DependencyPropertyIsNotAnimatable, dp.Name, this.GetType()), nameof(dp));
76throw new ArgumentException(SR.Format(SR.Animation_AnimationTimelineTypeMismatch, clock.Timeline.GetType(), dp.Name, dp.PropertyType), nameof(clock));
135throw new ArgumentException(SR.Format(SR.Animation_DependencyPropertyIsNotAnimatable, dp.Name, this.GetType()), nameof(dp));
141throw new ArgumentException(SR.Format(SR.Animation_AnimationTimelineTypeMismatch, animation.GetType(), dp.Name, dp.PropertyType), nameof(animation));
PresentationFramework (216)
MS\Internal\Annotations\Anchoring\FixedTextSelectionProcessor.cs (8)
99throw new ArgumentException(SR.Format(SR.SelectionDoesNotResolveToAPage, "start"), nameof(selection));
106throw new ArgumentException(SR.Format(SR.SelectionDoesNotResolveToAPage, "end"), nameof(selection));
193throw new ArgumentException(SR.StartNodeMustBeFixedPageProxy, nameof(startNode));
281throw new ArgumentException(SR.StartNodeMustBeDocumentPageViewOrFixedPage, nameof(startNode));
449throw new ArgumentException(SR.WrongSelectionType, $"selection: type={selection.GetType()}");
455throw new ArgumentException(SR.WrongSelectionType, $"selection: type={selection.GetType()}");
475throw new ArgumentException(SR.WrongSelectionType, $"selection: type={selection.GetType()}");
493throw new ArgumentException(SR.Format(SR.IncorrectLocatorPartType, $"{locatorPart.PartType.Namespace}:{locatorPart.PartType.Name}"), nameof(locatorPart));
System\Windows\Documents\DocumentStructures\SemanticBasicElement.cs (9)
69throw new ArgumentException(SR.Format(SR.DocumentStructureUnexpectedParameterType4, value.GetType(),
114throw new ArgumentException(SR.Format(SR.DocumentStructureUnexpectedParameterType1, value.GetType(),
152throw new ArgumentException(SR.Format(SR.UnexpectedParameterType, value.GetType(), typeof(NamedElement)), nameof(value));
201throw new ArgumentException(SR.Format(SR.UnexpectedParameterType, value.GetType(), typeof(ListItemStructure)), nameof(value));
243throw new ArgumentException(SR.Format(SR.DocumentStructureUnexpectedParameterType4, value.GetType(),
296throw new ArgumentException(SR.Format(SR.UnexpectedParameterType, value.GetType(), typeof(TableRowGroupStructure)), nameof(value));
338throw new ArgumentException(SR.Format(SR.UnexpectedParameterType, value.GetType(), typeof(TableRowStructure)), nameof(value));
381throw new ArgumentException(SR.Format(SR.UnexpectedParameterType, value.GetType(), typeof(TableCellStructure)), nameof(value));
425throw new ArgumentException(SR.Format(SR.DocumentStructureUnexpectedParameterType4, value.GetType(),
System\Windows\Documents\TextElementCollection.cs (5)
321throw new ArgumentException(SR.TextElementCollection_NoEnumerator, nameof(range));
335throw new ArgumentException(SR.Format(SR.TextElementCollection_ItemHasUnexpectedType, "range", typeof(TextElementType).Name, typeof(TextElementType).Name), "value");
398throw new ArgumentException(SR.Format(SR.TextElementCollection_TextElementTypeExpected, typeof(TextElementType).Name), nameof(value));
453throw new ArgumentException(SR.Format(SR.TextElementCollection_TextElementTypeExpected, typeof(TextElementType).Name), nameof(value));
564throw new ArgumentException(SR.Format(SR.TextElementCollection_TextElementTypeExpected, typeof(TextElementType).Name), nameof(value));
System\Windows\Documents\TextRangeBase.cs (6)
65throw new ArgumentException(SR.NotInAssociatedTree, nameof(textPointer));
1538throw new ArgumentException(SR.Format(SR.TextRange_UnsupportedDataFormat, dataFormat), nameof(dataFormat));
1572throw new ArgumentException(SR.Format(SR.TextRange_UnrecognizedStructureInDataFormat, dataFormat), nameof(stream));
1584throw new ArgumentException(SR.Format(SR.TextRange_UnrecognizedStructureInDataFormat, dataFormat), nameof(stream));
1589throw new ArgumentException(SR.Format(SR.TextRange_UnrecognizedStructureInDataFormat, dataFormat), nameof(stream));
1596throw new ArgumentException(SR.Format(SR.TextRange_UnsupportedDataFormat, dataFormat), nameof(dataFormat));
System\Windows\Standard\Verify.cs (16)
66throw new ArgumentException(errorMessage, name);
90throw new ArgumentException(errorMessage, name);
103throw new ArgumentException("The parameter must not be the default value.", name);
129throw new ArgumentException("The parameter must be null.", name);
161throw new ArgumentException("", name);
176throw new ArgumentException(message, name);
188throw new ArgumentException(message, parameterName);
193throw new ArgumentException(message, parameterName);
205throw new ArgumentException(message, parameterName);
210throw new ArgumentException(message, parameterName);
220throw new ArgumentException("The URI must be absolute.", parameterName);
235throw new ArgumentException(string.Create(CultureInfo.InvariantCulture, $"The integer value must be bounded with [{lowerBoundInclusive}, {upperBoundExclusive})"), parameterName);
244throw new ArgumentException(message, parameter);
257throw new ArgumentException("The type of this parameter does not support a required interface", parameterName);
267throw new ArgumentException($"No file exists at \"{filePath}\"", parameterName);
290throw new ArgumentException($"The parameter must implement interface {interfaceType}.", parameterName);
PresentationUI (2)
ReachFramework (5)
Roslyn.Diagnostics.Analyzers (4)
Roslyn.Diagnostics.Analyzers.UnitTests (4)
Shared (3)
Sockets.BindTests (1)
Sockets.FunctionalTests (1)
Swaggatherer (2)
System.CodeDom (23)
Microsoft\CSharp\CSharpCodeGenerator.cs (5)
613throw new ArgumentException(SR.Format(SR.InvalidElementType, e.GetType().FullName), nameof(e));
750throw new ArgumentException(SR.Format(SR.InvalidPrimitiveType, e.Value.GetType()), nameof(e));
914throw new ArgumentException(SR.Format(SR.Argument_NullComment, nameof(e)), nameof(e));
1234throw new ArgumentException(SR.Format(SR.InvalidElementType, e.GetType().FullName), nameof(e));
2683throw new ArgumentException(SR.Format(SR.InvalidIdentifier, value), nameof(value));
System\CodeDom\Compiler\CodeGenerator.cs (5)
608throw new ArgumentException(SR.Format(SR.InvalidElementType, e.GetType().FullName), nameof(e));
938throw new ArgumentException(SR.Format(SR.InvalidElementType, e.GetType().FullName), nameof(e));
1426throw new ArgumentException(SR.Format(SR.InvalidPrimitiveType, e.Value.GetType()), nameof(e));
1471throw new ArgumentException(SR.Format(SR.Argument_NullComment, nameof(e)), nameof(e));
1549throw new ArgumentException(SR.Format(SR.InvalidIdentifier, value), nameof(value));
System\CodeDom\Compiler\CodeValidator.cs (10)
59throw new ArgumentException(SR.Format(SR.InvalidElementType, e.GetType().FullName), nameof(e));
94throw new ArgumentException(SR.Format(SR.InvalidElementType, e.GetType().FullName), nameof(e));
455throw new ArgumentException(SR.Format(SR.InvalidElementType, e.GetType().FullName), nameof(e));
641throw new ArgumentException(SR.Format(SR.ArityDoesntMatch, baseType, e.TypeArguments.Count), nameof(e));
650throw new ArgumentException(message, nameof(e));
659throw new ArgumentException(message, nameof(e));
768throw new ArgumentException(SR.Format(SR.InvalidElementType, e.GetType().FullName), nameof(e));
938throw new ArgumentException(SR.Format(SR.InvalidElementType, e.GetType().FullName), nameof(e));
945throw new ArgumentException(SR.Format(SR.InvalidPathCharsInChecksum, e.FileName), nameof(e));
951throw new ArgumentException(SR.Format(SR.InvalidRegion, e.RegionText), nameof(e));
System.Collections (67)
System\Collections\Generic\OrderedDictionary.cs (21)
299throw new ArgumentException(SR.Format(SR.Arg_WrongType, value, typeof(KeyValuePair<TKey, TValue>)), nameof(value));
330throw new ArgumentException(SR.Format(SR.Arg_WrongType, key, typeof(TKey)), nameof(key));
338throw new ArgumentException(SR.Format(SR.Arg_WrongType, value, typeof(TValue)), nameof(value));
1242throw new ArgumentException(SR.Format(SR.Arg_WrongType, key, typeof(TKey)), nameof(key));
1255throw new ArgumentException(SR.Format(SR.Arg_WrongType, value, typeof(TValue)), nameof(value));
1290throw new ArgumentException(SR.Arg_RankMultiDimNotSupported, nameof(array));
1295throw new ArgumentException(SR.Arg_NonZeroLowerBound, nameof(array));
1315throw new ArgumentException(SR.Argument_IncompatibleArrayType, nameof(array));
1325throw new ArgumentException(SR.Argument_IncompatibleArrayType, nameof(array));
1335throw new ArgumentException(SR.Format(SR.Arg_WrongType, value, typeof(KeyValuePair<TKey, TValue>)), nameof(value));
1364throw new ArgumentException(SR.Format(SR.Arg_WrongType, value, typeof(KeyValuePair<TKey, TValue>)), nameof(value));
1515throw new ArgumentException(SR.Arg_ArrayPlusOffTooSmall, nameof(array));
1533throw new ArgumentException(SR.Arg_RankMultiDimNotSupported, nameof(array));
1538throw new ArgumentException(SR.Arg_NonZeroLowerBound, nameof(array));
1558throw new ArgumentException(SR.Argument_IncompatibleArrayType, nameof(array));
1568throw new ArgumentException(SR.Argument_IncompatibleArrayType, nameof(array));
1704throw new ArgumentException(SR.Arg_ArrayPlusOffTooSmall, nameof(array));
1842throw new ArgumentException(SR.Arg_RankMultiDimNotSupported, nameof(array));
1847throw new ArgumentException(SR.Arg_NonZeroLowerBound, nameof(array));
1867throw new ArgumentException(SR.Argument_IncompatibleArrayType, nameof(array));
1877throw new ArgumentException(SR.Argument_IncompatibleArrayType, nameof(array));
System\Collections\Generic\SortedDictionary.cs (10)
328throw new ArgumentException(SR.Format(SR.Arg_WrongType, value, typeof(TValue)), nameof(value));
333throw new ArgumentException(SR.Format(SR.Arg_WrongType, key, typeof(TKey)), nameof(key));
357throw new ArgumentException(SR.Format(SR.Arg_WrongType, value, typeof(TValue)), nameof(value));
362throw new ArgumentException(SR.Format(SR.Arg_WrongType, key, typeof(TKey)), nameof(key));
556throw new ArgumentException(SR.Arg_RankMultiDimNotSupported, nameof(array));
561throw new ArgumentException(SR.Arg_NonZeroLowerBound, nameof(array));
584throw new ArgumentException(SR.Argument_IncompatibleArrayType, nameof(array));
717throw new ArgumentException(SR.Arg_RankMultiDimNotSupported, nameof(array));
722throw new ArgumentException(SR.Arg_NonZeroLowerBound, nameof(array));
745throw new ArgumentException(SR.Argument_IncompatibleArrayType, nameof(array));
System\Collections\Generic\SortedList.cs (12)
185throw new ArgumentException(SR.Format(SR.Argument_AddingDuplicate, key), nameof(key));
273throw new ArgumentException(SR.Format(SR.Arg_WrongType, key, typeof(TKey)), nameof(key));
276throw new ArgumentException(SR.Format(SR.Arg_WrongType, value, typeof(TValue)), nameof(value));
458throw new ArgumentException(SR.Arg_RankMultiDimNotSupported, nameof(array));
463throw new ArgumentException(SR.Arg_NonZeroLowerBound, nameof(array));
488throw new ArgumentException(SR.Argument_IncompatibleArrayType, nameof(array));
500throw new ArgumentException(SR.Argument_IncompatibleArrayType, nameof(array));
627throw new ArgumentException(SR.Format(SR.Arg_WrongType, value, typeof(TValue)), nameof(value));
1055throw new ArgumentException(SR.Arg_RankMultiDimNotSupported, nameof(array));
1064throw new ArgumentException(SR.Argument_IncompatibleArrayType, nameof(array));
1169throw new ArgumentException(SR.Arg_RankMultiDimNotSupported, nameof(array));
1178throw new ArgumentException(SR.Argument_IncompatibleArrayType, nameof(array));
System.Collections.Concurrent (11)
System.Collections.Immutable (15)
System.Collections.NonGeneric (5)
System.Collections.Specialized (3)
System.ComponentModel.Annotations (4)
System.ComponentModel.Composition (27)
System\ComponentModel\Composition\ExceptionBuilder.cs (9)
25return new ArgumentException(message, parameterName);
41throw new ArgumentException(SR.Format(SR.ArgumentException_EmptyString, nameof(memberName)), nameof(memberName));
61return new ArgumentException(message, parameterName);
70throw new ArgumentException(SR.Format(SR.ArgumentException_EmptyString, nameof(parameterName)), nameof(parameterName));
75return new ArgumentException(message, parameterName);
94throw new ArgumentException(SR.Format(SR.ArgumentException_EmptyString, nameof(parameterName)), nameof(parameterName));
99return new ArgumentException(SR.Format(SR.ReflectionModel_InvalidPartDefinition, partDefinitionType), parameterName);
108throw new ArgumentException(SR.Format(SR.ArgumentException_EmptyString, nameof(typeName)), nameof(typeName));
113return new ArgumentException(message, typeName);
System.ComponentModel.Composition.Registration (2)
System.ComponentModel.Primitives (1)
System.ComponentModel.TypeConverter (11)
System.Composition.Convention (11)
System.Composition.Hosting (2)
System.Configuration.ConfigurationManager (17)
System.Data.Common (4)
System.Data.Odbc (1)
System.Diagnostics.DiagnosticSource (1)
System.Diagnostics.TraceSource (3)
System.Formats.Asn1 (25)
System.Formats.Cbor (2)
System.Formats.Nrbf (1)
System.Formats.Tar (17)
System.IO.Compression (5)
System.IO.Compression.Brotli (4)
System.IO.Compression.ZipFile (3)
System.IO.FileSystem.DriveInfo (2)
System.IO.FileSystem.Watcher (4)
System.IO.Hashing (1)
System.IO.MemoryMappedFiles (5)
System.IO.Packaging (5)
System.IO.Pipes (7)
System.IO.Ports (4)
System.Linq.Expressions (81)
System\Linq\Expressions\Error.cs (81)
47return new ArgumentException(Strings.SameKeyExistsInExpando(key), nameof(key));
124return new ArgumentException(Strings.SetterHasNoParams, paramName);
131return new ArgumentException(Strings.PropertyCannotHaveRefType, paramName);
138return new ArgumentException(Strings.IndexesOfSetGetMustMatch, paramName);
159return new ArgumentException(Strings.AccessorsCannotHaveVarArgs, paramName);
166return new ArgumentException(Strings.AccessorsCannotHaveByRefArgs, paramName);
194return new ArgumentException(Strings.BoundsCannotBeLessThanOne, paramName);
201return new ArgumentException(Strings.TypeMustNotBeByRef, paramName);
209return new ArgumentException(Strings.TypeMustNotBePointer, paramName);
217return new ArgumentException(Strings.SetterMustBeVoid, paramName);
225return new ArgumentException(Strings.PropertyTypeMustMatchGetter, paramName);
233return new ArgumentException(Strings.PropertyTypeMustMatchSetter, paramName);
240return new ArgumentException(Strings.BothAccessorsMustBeStatic, paramName);
247return new ArgumentException(Strings.OnlyStaticFieldsHaveNullInstance, paramName);
254return new ArgumentException(Strings.OnlyStaticPropertiesHaveNullInstance, paramName);
268return new ArgumentException(Strings.PropertyTypeCannotBeVoid, paramName);
275return new ArgumentException(Strings.InvalidUnboxType, paramName);
282return new ArgumentException(Strings.ExpressionMustBeWriteable, paramName);
289return new ArgumentException(Strings.ArgumentMustNotHaveValueType, paramName);
303return new ArgumentException(Strings.AllTestValuesMustHaveSameType, paramName);
310return new ArgumentException(Strings.AllCaseBodiesMustHaveSameType, paramName);
317return new ArgumentException(Strings.DefaultBodyMustBeSupplied, paramName);
324return new ArgumentException(Strings.LabelMustBeVoidOrHaveExpression, paramName);
331return new ArgumentException(Strings.LabelTypeMustBeVoid, paramName);
338return new ArgumentException(Strings.QuotedExpressionMustBeLambda, paramName);
345return new ArgumentException(Strings.VariableMustNotBeByRef(p0, p1), paramName);
359return new ArgumentException(Strings.DuplicateVariable(p0), paramName);
380return new ArgumentException(Strings.FaultCannotHaveCatchOrFinally, paramName);
408return new ArgumentException(Strings.UserDefinedOperatorMustBeStatic(p0), paramName);
415return new ArgumentException(Strings.UserDefinedOperatorMustNotBeVoid(p0), paramName);
478return new ArgumentException(Strings.ArgumentMustBeArray, paramName);
485return new ArgumentException(Strings.ArgumentMustBeBoolean, paramName);
492return new ArgumentException(Strings.EqualityMustReturnBoolean(p0), paramName);
499return new ArgumentException(Strings.ArgumentMustBeFieldInfoOrPropertyInfo, paramName);
506return new ArgumentException(Strings.ArgumentMustBeFieldInfoOrPropertyInfoOrMethod, paramName);
521return new ArgumentException(Strings.ArgumentMustBeInstanceMember, paramName);
535return new ArgumentException(Strings.ArgumentMustBeInteger, paramName);
549return new ArgumentException(Strings.ArgumentMustBeArrayIndexType, paramName);
563return new ArgumentException(Strings.ArgumentMustBeSingleDimensionalArrayType, paramName);
577return new ArgumentException(Strings.ArgumentTypesMustMatch, paramName);
598return new ArgumentException(Strings.IncorrectTypeForTypeAs(p0), paramName);
620return new ArgumentException(Strings.ArgumentTypeDoesNotMatchMember(p0, p1), paramName);
634return new ArgumentException(Strings.ArgumentMemberNotDeclOnType(p0, p1), paramName);
670return new ArgumentException(Strings.ExpressionTypeNotInvocable(p0), paramName);
727return new ArgumentException(Strings.LambdaTypeMustBeDerivedFromSystemDelegate, paramName);
734return new ArgumentException(Strings.MemberNotFieldOrProperty(p0), paramName);
741return new ArgumentException(Strings.MethodContainsGenericParameters(p0), paramName);
748return new ArgumentException(Strings.MethodIsGeneric(p0), paramName);
755return new ArgumentException(Strings.MethodNotPropertyAccessor(p0, p1), paramName);
769return new ArgumentException(Strings.PropertyDoesNotHaveGetter(p0), paramName);
783return new ArgumentException(Strings.PropertyDoesNotHaveSetter(p0), paramName);
790return new ArgumentException(Strings.PropertyDoesNotHaveAccessor(p0), paramName);
797return new ArgumentException(Strings.NotAMemberOfType(p0, p1), paramName);
812return new ArgumentException(Strings.NotAMemberOfAnyType(p0), paramName);
827return new ArgumentException(Strings.PropertyNotDefinedForType(p0, p1), paramName);
834return new ArgumentException(Strings.InstancePropertyNotDefinedForType(p0, p1), paramName);
848return new ArgumentException(Strings.InstancePropertyWithSpecifiedParametersNotDefinedForType(p0, p1, p2), paramName);
863return new ArgumentException(Strings.TypeMissingDefaultConstructor(p0), paramName);
871return new ArgumentException(Strings.ElementInitializerMethodNotAdd, paramName);
878return new ArgumentException(Strings.ElementInitializerMethodNoRefOutParam(p0, p1), paramName);
885return new ArgumentException(Strings.ElementInitializerMethodWithZeroArgs, paramName);
892return new ArgumentException(Strings.ElementInitializerMethodStatic, paramName);
899return new ArgumentException(Strings.TypeNotIEnumerable(p0), paramName);
907return new ArgumentException(Strings.UnhandledBinary(p0), paramName);
929return new ArgumentException(Strings.UnhandledUnary(p0), paramName);
936return new ArgumentException(Strings.UnknownBindingType, $"bindings[{index}]");
992return new ArgumentException(Strings.IncorrectNumberOfTypeArgsForFunc, paramName);
999return new ArgumentException(Strings.IncorrectNumberOfTypeArgsForAction, paramName);
1006return new ArgumentException(Strings.ArgumentCannotBeOfTypeVoid, paramName);
1213return new ArgumentException(Strings.NonStaticConstructorRequired, paramName);
1245return new ArgumentException(Strings.TypeContainsGenericParameters(p0), paramName);
1261return new ArgumentException(Strings.TypeIsGeneric(p0), paramName);
1285return new ArgumentException(Strings.ExpressionTypeDoesNotMatchMethodParameter(p0, p1, p2), paramName);
1301return new ArgumentException(Strings.ExpressionTypeDoesNotMatchParameter(p0, p1), paramName);
1325return new ArgumentException(Strings.IncorrectNumberOfMethodCallArguments(p0), paramName);
1333return new ArgumentException(Strings.ExpressionTypeDoesNotMatchConstructorParameter(p0, p1), paramName);
1350return new ArgumentException(Strings.ExpressionMustBeReadable, paramName);
1363return new ArgumentException(Strings.InvalidArgumentValue_ParamName, paramName);
1368return new ArgumentException(Strings.NonEmptyCollectionRequired, paramName);
1373return new ArgumentException(Strings.InvalidNullValue(type), paramName);
1378return new ArgumentException(Strings.InvalidObjectType(value?.GetType() as object ?? "null", type), paramName);
System.Memory (2)
System.Net.Http (3)
System.Net.HttpListener (15)
System.Net.Mail (5)
System.Net.NameResolution (5)
System.Net.Ping (2)
System.Net.Primitives (9)
System.Net.Quic (5)
System.Net.Requests (23)
System\Net\HttpWebRequest.cs (10)
383throw new ArgumentException(SR.net_invalid_host, nameof(value));
477throw new ArgumentException(SR.net_nochunked, nameof(value));
615throw new ArgumentException(SR.net_connarg, nameof(value));
664throw new ArgumentException(SR.net_no100, nameof(value));
836throw new ArgumentException(SR.net_wrongversion, nameof(value));
937throw new ArgumentException(SR.net_badmethod, nameof(value));
1163throw new ArgumentException(SR.net_io_invalidasyncresult, nameof(asyncResult));
1434throw new ArgumentException(SR.net_io_invalidasyncresult, nameof(asyncResult));
1522throw new ArgumentException(SR.net_nottoken, nameof(rangeSpecifier));
1541throw new ArgumentException(SR.net_nottoken, nameof(rangeSpecifier));
System.Net.Security (13)
System.Net.ServerSentEvents (2)
System.Net.Sockets (40)
System\Net\Sockets\Socket.cs (28)
243throw new ArgumentException(SR.Arg_InvalidHandle, nameof(handle));
939throw new ArgumentException(SR.net_sockets_invalid_ipaddress_length, nameof(addresses));
977throw new ArgumentException(SR.net_invalidAddressList, nameof(addresses));
1146throw new ArgumentException(SR.Format(SR.net_sockets_zerolist, nameof(buffers)), nameof(buffers));
1633throw new ArgumentException(SR.Format(SR.net_sockets_zerolist, nameof(buffers)), nameof(buffers));
1751throw new ArgumentException(SR.Format(SR.net_InvalidEndPointAddressFamily, remoteEP.AddressFamily, _addressFamily), nameof(remoteEP));
2123throw new ArgumentException(SR.Format(SR.net_sockets_invalid_optionValue, "LingerOption"), nameof(optionValue));
2127throw new ArgumentException(SR.Format(SR.ArgumentOutOfRange_Bounds_Lower_Upper_Named, 0, (int)ushort.MaxValue, "optionValue.LingerTime"), nameof(optionValue));
2136throw new ArgumentException(SR.Format(SR.net_sockets_invalid_optionValue, "MulticastOption"), nameof(optionValue));
2146throw new ArgumentException(SR.Format(SR.net_sockets_invalid_optionValue, "IPv6MulticastOption"), nameof(optionValue));
2152throw new ArgumentException(SR.net_sockets_invalid_optionValue_all, nameof(optionValue));
2309throw new ArgumentException(SR.net_sockets_invalid_optionValue_all, nameof(level));
2691throw new ArgumentException(SR.Format(SR.net_InvalidEndPointAddressFamily, endPoint.AddressFamily, _addressFamily), nameof(endPoint));
2731throw new ArgumentException(SR.Format(SR.net_InvalidEndPointAddressFamily, endPoint.AddressFamily, _addressFamily), nameof(endPoint));
2840throw new ArgumentException(SR.net_multibuffernotsupported, nameof(e));
2889throw new ArgumentException(SR.net_multibuffernotsupported, "BufferList");
2986throw new ArgumentException(SR.net_multibuffernotsupported, nameof(e));
2990throw new ArgumentException(SR.Format(SR.InvalidNullArgument, "e.RemoteEndPoint"), nameof(e));
3094throw new ArgumentException(SR.Format(SR.net_sockets_invalid_dnsendpoint, "e.RemoteEndPoint"), nameof(e));
3099throw new ArgumentException(SR.Format(SR.InvalidNullArgument, "e.RemoteEndPoint"), nameof(e));
3103throw new ArgumentException(SR.Format(SR.net_InvalidEndPointAddressFamily, endPointSnapshot.AddressFamily, _addressFamily), nameof(e));
3148throw new ArgumentException(SR.Format(SR.InvalidNullArgument, "e.RemoteEndPoint"), nameof(e));
3152throw new ArgumentException(SR.Format(SR.net_InvalidEndPointAddressFamily, e.RemoteEndPoint.AddressFamily, _addressFamily), nameof(e));
3220throw new ArgumentException(SR.Format(SR.InvalidNullArgument, "e.SendPacketsElements"), nameof(e));
3258throw new ArgumentException(SR.Format(SR.InvalidNullArgument, "e.RemoteEndPoint"), nameof(e));
3340throw new ArgumentException(SR.Format(SR.net_sockets_invalid_dnsendpoint, nameof(remoteEP)), nameof(remoteEP));
3955throw new ArgumentException(SR.Format(SR.net_sockets_invalid_dnsendpoint, remoteEndPointArgumentName), remoteEndPointArgumentName);
3960throw new ArgumentException(SR.Format(SR.net_InvalidEndPointAddressFamily, remoteEndPoint.AddressFamily, _addressFamily), remoteEndPointArgumentName);
System.Net.WebHeaderCollection (7)
System.Net.WebSockets (10)
System.Net.WebSockets.Client (9)
System.Numerics.Tensors (11)
System.ObjectModel (15)
System\Collections\Specialized\NotifyCollectionChangedEventArgs.cs (11)
30throw new ArgumentException(SR.Format(SR.WrongActionForCtor, NotifyCollectionChangedAction.Reset), nameof(action));
59throw new ArgumentException(SR.ResetActionRequiresNullItem, nameof(action));
63throw new ArgumentException(SR.ResetActionRequiresIndexMinus1, nameof(action));
78throw new ArgumentException(SR.MustBeResetAddOrRemoveActionForCtor, nameof(action));
107throw new ArgumentException(SR.ResetActionRequiresNullItem, nameof(action));
111throw new ArgumentException(SR.ResetActionRequiresIndexMinus1, nameof(action));
133throw new ArgumentException(SR.MustBeResetAddOrRemoveActionForCtor, nameof(action));
161throw new ArgumentException(SR.Format(SR.WrongActionForCtor, NotifyCollectionChangedAction.Replace), nameof(action));
192throw new ArgumentException(SR.Format(SR.WrongActionForCtor, NotifyCollectionChangedAction.Replace), nameof(action));
214throw new ArgumentException(SR.Format(SR.WrongActionForCtor, NotifyCollectionChangedAction.Move), nameof(action));
235throw new ArgumentException(SR.Format(SR.WrongActionForCtor, NotifyCollectionChangedAction.Move), nameof(action));
System.Private.CoreLib (496)
src\libraries\System.Private.CoreLib\src\System\Globalization\DateTimeFormatInfo.cs (11)
1071throw new ArgumentException(SR.Format(SR.Argument_InvalidArrayLength, 7), nameof(value));
1096throw new ArgumentException(SR.Format(SR.Argument_InvalidArrayLength, 7), nameof(value));
1116throw new ArgumentException(SR.Format(SR.Argument_InvalidArrayLength, 7), nameof(value));
1138throw new ArgumentException(SR.Format(SR.Argument_InvalidArrayLength, 13), nameof(value));
1159throw new ArgumentException(SR.Format(SR.Argument_InvalidArrayLength, 13), nameof(value));
1327_ => throw new ArgumentException(SR.Format(SR.Format_BadFormatSpecifier, format), nameof(format)),
1603throw new ArgumentException(SR.Arg_ArrayZeroError, nameof(patterns));
1649throw new ArgumentException(SR.Format(SR.Format_BadFormatSpecifier, format), nameof(format));
1665throw new ArgumentException(SR.Format(SR.Argument_InvalidArrayLength, 13), nameof(value));
1686throw new ArgumentException(SR.Format(SR.Argument_InvalidArrayLength, 13), nameof(value));
1747throw new ArgumentException(message, styles ? nameof(styles) : nameof(style));
src\libraries\System.Private.CoreLib\src\System\Globalization\IdnMapping.cs (37)
79throw new ArgumentException(SR.Argument_IdnBadLabelSize, nameof(unicode));
83throw new ArgumentException(SR.Format(SR.Argument_InvalidCharSequence, index + count - 1), nameof(unicode));
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\RegionInfo.cs (6)
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));
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\Reflection\Emit\TypeBuilder.cs (14)
90throw new ArgumentException(SR.Arg_EmptyArray, nameof(names));
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\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\Versioning\VersioningHelper.cs (5)
37throw new ArgumentException(SR.Format(SR.Argument_ResourceScopeWrongDirection, fromResType, toResType), nameof(from));
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 (17)
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));
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));
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));
src\libraries\System.Private.CoreLib\src\System\ThrowHelper.cs (11)
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);
137throw new ArgumentException(SR.Format(SR.ArgumentException_ValueTupleIncorrectType, obj.GetType()), "other");
290throw new ArgumentException(SR.Arg_CannotBeNaN, GetArgumentName(argument));
341throw new ArgumentException(SR.Arg_HandleNotSync, paramName);
347throw new ArgumentException(SR.Arg_HandleNotAsync, paramName);
530throw new ArgumentException(SR.Arg_InvalidHandle, paramName);
730return new ArgumentException(SR.Format(SR.Arg_WrongType, key, targetType), nameof(key));
735return new ArgumentException(SR.Format(SR.Arg_WrongType, value, targetType), nameof(value));
750return new ArgumentException(GetResourceString(resource), GetArgumentName(argument));
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\System\Delegate.CoreCLR.cs (16)
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));
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));
302throw new ArgumentException(SR.Argument_MustBeRuntimeType, nameof(type));
305throw new ArgumentException(SR.Argument_MustBeRuntimeMethodInfo, nameof(method));
308throw new ArgumentException(SR.Arg_MustBeDelegate, nameof(type));
337throw new ArgumentException(SR.Argument_MustBeRuntimeType, nameof(type));
340throw new ArgumentException(SR.Argument_MustBeRuntimeMethodInfo, nameof(method));
343throw new ArgumentException(SR.Arg_MustBeDelegate, nameof(type));
375throw new ArgumentException(SR.Argument_MustBeRuntimeType, nameof(type));
378throw new ArgumentException(SR.Arg_MustBeDelegate, nameof(type));
src\System\Reflection\Emit\SignatureHelper.cs (11)
102throw new ArgumentException(SR.Argument_UnknownUnmanagedCallConv, nameof(unmanagedCallConv));
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));
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));
src\System\Reflection\RuntimeModule.cs (11)
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),
153throw new ArgumentException(SR.Format(SR.Argument_ResolveField, tk, this), nameof(metadataToken));
183throw new ArgumentException(SR.Format(SR.Argument_ResolveField, tk, this),
191throw new ArgumentException(SR.Format(SR.Argument_ResolveField, tk, this),
226throw new ArgumentException(SR.Format(SR.Argument_ResolveModuleType, tk), nameof(metadataToken));
229throw new ArgumentException(SR.Format(SR.Argument_ResolveType, tk, this), nameof(metadataToken));
291throw new ArgumentException(SR.Format(SR.Argument_ResolveMember, tk, this),
363throw new ArgumentException(SR.Arg_MustBeType, nameof(attributeType));
373throw new ArgumentException(SR.Arg_MustBeType, nameof(attributeType));
src\System\Runtime\InteropServices\Marshal.CoreCLR.cs (10)
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));
System.Private.DataContractSerialization (40)
System\Runtime\Serialization\Json\XmlJsonWriter.cs (12)
661throw new ArgumentException(SR.JsonXmlProcessingInstructionNotSupported, nameof(name));
676throw new ArgumentException(SR.JsonInvalidLocalNameEmpty, nameof(localName));
714throw new ArgumentException(SR.Format(SR.XmlPrefixBoundToNamespace, "xmlns", xmlnsNamespace, ns), nameof(ns));
719throw new ArgumentException(SR.Format(SR.JsonPrefixMustBeNullOrEmpty, prefix), nameof(prefix));
742throw new ArgumentException(SR.Format(SR.JsonNamespaceMustBeEmpty, ns), nameof(ns));
748throw new ArgumentException(SR.JsonInvalidLocalNameEmpty, nameof(localName));
804throw new ArgumentException(SR.Format(SR.JsonUnexpectedAttributeLocalName, localName), nameof(localName));
833throw new ArgumentException(SR.JsonInvalidLocalNameEmpty, nameof(localName));
839throw new ArgumentException(SR.Format(SR.JsonPrefixMustBeNullOrEmpty, prefix), nameof(prefix));
846throw new ArgumentException(SR.Format(SR.JsonNamespaceMustBeEmpty, ns), nameof(ns));
1061throw new ArgumentException(SR.Format(SR.JsonOnlyWhitespace, ws[pos].ToString(), "WriteWhitespace"), nameof(ws));
1432throw new ArgumentException(SR.JsonNestedArraysNotSupported, nameof(value));
System\Xml\XmlBaseWriter.cs (17)
231throw new ArgumentException(SR.Format(SR.XmlPrefixBoundToNamespace, "xml", xmlNamespace, ns), nameof(ns));
239throw new ArgumentException(SR.Format(SR.XmlPrefixBoundToNamespace, "xmlns", xmlnsNamespace, ns), nameof(ns));
253throw new ArgumentException(SR.Format(SR.XmlUndefinedPrefix, prefix), nameof(prefix));
260throw new ArgumentException(SR.XmlEmptyNamespaceRequiresNullPrefix, nameof(prefix));
442throw new ArgumentException(SR.XmlInvalidCommentChars, nameof(text));
499throw new ArgumentException(SR.InvalidLocalNameEmpty, nameof(localName));
513throw new ArgumentException(SR.Format(SR.XmlUndefinedPrefix, prefix), nameof(prefix));
563throw new ArgumentException(SR.Format(SR.XmlUndefinedPrefix, prefix), nameof(prefix));
819throw new ArgumentException(SR.Format(SR.XmlNamespaceNotFound, namespaceUri), nameof(namespaceUri));
847throw new ArgumentException(SR.InvalidLocalNameEmpty, nameof(localName));
891throw new ArgumentException(SR.XmlProcessingInstructionNotSupported, nameof(name));
967throw new ArgumentException(SR.XmlOnlyWhitespace, nameof(whitespace));
1106throw new ArgumentException(SR.XmlMissingLowSurrogate, nameof(ch));
1227throw new ArgumentException(SR.XmlNestedArraysNotSupported, nameof(value));
2150throw new ArgumentException(SR.XmlReservedPrefix, nameof(prefix));
2163throw new ArgumentException(SR.Format(SR.XmlPrefixBoundToNamespace, prefix, nameSpace.Uri, uri), nameof(prefix));
2167throw new ArgumentException(SR.XmlEmptyNamespaceRequiresNullPrefix, nameof(prefix));
System.Private.Uri (5)
System.Private.Windows.Core (8)
System.Private.Xml (56)
System\Xml\Serialization\XmlSerializationReader.cs (11)
972throw new ArgumentException(SR.Format(SR.XmlEmptyArrayType, CurrentTag()), nameof(value));
985throw new ArgumentException(SR.XmlInvalidArraySyntax, nameof(value));
993throw new ArgumentException(SR.Format(SR.XmlInvalidArrayDimentions, CurrentTag()), nameof(value));
998throw new ArgumentException(SR.XmlMismatchedArrayBrackets, nameof(value));
1006throw new ArgumentException(SR.Format(SR.XmlInvalidArrayLength, new string(lengthStringSpan)), nameof(value));
1020throw new ArgumentException(SR.XmlMismatchedArrayBrackets, nameof(value));
1022throw new ArgumentException(SR.Format(SR.XmlInvalidArrayDimentions, CurrentTag()), nameof(value));
1024throw new ArgumentException(SR.XmlInvalidArraySyntax, nameof(value));
1074throw new ArgumentException(SR.Format(SR.XmlInvalidArrayLength, dimensions[i]), "value");
2332throw new ArgumentException(SR.XmlInternalError, nameof(xmlMapping));
2338throw new ArgumentException(SR.XmlInternalError, nameof(xmlMapping));
System\Xml\XmlEncoding.cs (5)
32throw new ArgumentException(SR.Format(SR.Enc_InvalidByteInEncoding, -1), (string?)null);
524throw new ArgumentException(SR.Format(SR.Enc_InvalidByteInEncoding, new object[1] { i }), (string?)null);
565throw new ArgumentException(SR.Format(SR.Enc_InvalidByteInEncoding, new object[1] { i }), (string?)null);
607throw new ArgumentException(SR.Format(SR.Enc_InvalidByteInEncoding, new object[1] { i }), (string?)null);
649throw new ArgumentException(SR.Format(SR.Enc_InvalidByteInEncoding, new object[1] { i }), (string?)null);
System.Private.Xml.Linq (5)
System.Reflection.Context (1)
System.Reflection.DispatchProxy (5)
System.Reflection.Emit (23)
System\Reflection\Emit\CustomAttributeWrapper.cs (4)
44throw new ArgumentException(SR.Format(SR.Argument_InvalidCustomAttributeLength, ctor.DeclaringType, binaryAttribute.Length), nameof(binaryAttribute));
48throw new ArgumentException(SR.Format(SR.Argument_InvalidProlog, ctor.DeclaringType), nameof(binaryAttribute));
88throw new ArgumentException(SR.Format(SR.Argument_UnknownNamedType, ctor.DeclaringType, namedType), nameof(binaryAttribute));
174_ => throw new ArgumentException(SR.Argument_InvalidTypeCodeForTypeArgument, "binaryAttribute"),
System\Reflection\Emit\PseudoCustomAttributesData.cs (6)
346throw new ArgumentException(SR.Argument_InvalidArgumentForAttribute, nameof(con));
372throw new ArgumentException(SR.Format(SR.Argument_InvalidParameterForUnmanagedType, paramNames[i], "ByValTStr"), "binaryAttribute");
380throw new ArgumentException(SR.Argument_SizeConstMustBeSpecified, "binaryAttribute");
406throw new ArgumentException(SR.Format(SR.Argument_InvalidParameterForUnmanagedType, paramNames[i], "SafeArray"), "binaryAttribute");
422throw new ArgumentException(SR.Format(SR.Argument_InvalidParameterForUnmanagedType, elementType, "SafeArray"), "binaryAttribute");
459throw new ArgumentException(SR.Format(SR.Argument_InvalidParameterForUnmanagedType,
System\Reflection\Emit\TypeBuilderImpl.cs (7)
293throw new ArgumentException(SR.Argument_BadSizeForData, nameof(data.Length));
329throw new ArgumentException(SR.Format(SR.Argument_MethodOverridden, methodInfoBody.Name, FullName), nameof(methodInfoDeclaration));
370new ArgumentException(SR.Format(SR.Argument_InvalidMethodOverride, FullName, methodName), "methodInfoBody");
432throw new ArgumentException(SR.Argument_BadSizeForData, nameof(size));
552throw new ArgumentException(SR.Format(SR.Argument_UnknownNamedType, con.DeclaringType, name), nameof(binaryAttribute));
1321throw new ArgumentException(SR.Argument_MustBeInterface, nameof(interfaceType));
1326throw new ArgumentException(SR.Argument_InterfaceNotFound, nameof(interfaceType));
System.Reflection.Metadata (34)
System.Reflection.MetadataLoadContext (10)
System.Resources.Extensions (1)
System.Runtime.Caching (13)
System\Runtime\Caching\Configuration\ConfigUtil.cs (5)
37throw new ArgumentException(RH.Format(SR.Value_must_be_non_negative_integer, valueName, sValue), nameof(config));
40throw new ArgumentException(RH.Format(SR.Value_must_be_positive_integer, valueName, sValue), nameof(config));
45throw new ArgumentException(RH.Format(SR.Value_too_big,
71throw new ArgumentException(RH.Format(SR.TimeSpan_invalid_format, valueName, sValue), nameof(config));
91throw new ArgumentException(RH.Format(SR.Value_must_be_boolean, valueName, sValue), nameof(config));
System.Runtime.InteropServices (4)
System.Runtime.Numerics (4)
System.Runtime.Serialization.Formatters (4)
System.Security.Cryptography (300)
System\Security\Cryptography\HKDF.cs (7)
57throw new ArgumentException(SR.Format(SR.Cryptography_Prk_TooSmall, hashLength), nameof(prk));
92throw new ArgumentException(SR.Format(SR.Cryptography_Prk_TooSmall, hashLength), nameof(prk));
123throw new ArgumentException(SR.Argument_DestinationTooShort, nameof(output));
126throw new ArgumentException(SR.Format(SR.Cryptography_Prk_TooSmall, hashLength), nameof(prk));
131throw new ArgumentException(SR.Format(SR.Cryptography_Okm_TooLarge, maxOkmLength), nameof(output));
180throw new ArgumentException(SR.Argument_DestinationTooShort, nameof(output));
185throw new ArgumentException(SR.Format(SR.Cryptography_Okm_TooLarge, maxOkmLength), nameof(output));
System\Security\Cryptography\SymmetricAlgorithm.cs (11)
377throw new ArgumentException(SR.Cryptography_MatchBlockSize, nameof(plaintextLength));
448throw new ArgumentException(SR.Argument_BitsMustBeWholeBytes, nameof(feedbackSizeInBits));
456throw new ArgumentException(SR.Cryptography_MatchFeedbackSize, nameof(plaintextLength));
564throw new ArgumentException(SR.Argument_DestinationTooShort, nameof(destination));
682throw new ArgumentException(SR.Argument_DestinationTooShort, nameof(destination));
826throw new ArgumentException(SR.Argument_DestinationTooShort, nameof(destination));
979throw new ArgumentException(SR.Argument_DestinationTooShort, nameof(destination));
1200throw new ArgumentException(SR.Argument_DestinationTooShort, nameof(destination));
1432throw new ArgumentException(SR.Argument_DestinationTooShort, nameof(destination));
1674throw new ArgumentException(SR.Cryptography_InvalidIVSize, nameof(iv));
1681throw new ArgumentException(SR.Cryptography_InvalidFeedbackSize, nameof(feedbackSizeInBits));
System.Security.Cryptography.Cose (35)
System\Security\Cryptography\Cose\CoseSign1Message.cs (10)
159throw new ArgumentException(SR.Sign1ArgumentStreamNotReadable, nameof(detachedContent));
162throw new ArgumentException(SR.Sign1ArgumentStreamNotSeekable, nameof(detachedContent));
210throw new ArgumentException(SR.Sign1ArgumentStreamNotReadable, nameof(detachedContent));
213throw new ArgumentException(SR.Sign1ArgumentStreamNotSeekable, nameof(detachedContent));
297throw new ArgumentException(SR.Sign1SignHeaderDuplicateLabels, nameof(signer));
302throw new ArgumentException(SR.Format(SR.CriticalHeaderMissing, labelName), nameof(signer));
557throw new ArgumentException(SR.Sign1ArgumentStreamNotReadable, nameof(detachedContent));
562throw new ArgumentException(SR.Sign1ArgumentStreamNotSeekable, nameof(detachedContent));
652throw new ArgumentException(SR.Sign1ArgumentStreamNotReadable, nameof(detachedContent));
657throw new ArgumentException(SR.Sign1ArgumentStreamNotSeekable, nameof(detachedContent));
System.Security.Cryptography.Pkcs (11)
System.Security.Cryptography.ProtectedData (2)
System.Security.Cryptography.Xml (29)
System.Security.Permissions (3)
System.ServiceModel.Federation (2)
System.ServiceModel.NetFramingBase (2)
System.ServiceModel.Primitives.Tests (1)
System.ServiceModel.Syndication (9)
System.Text.Encoding.CodePages (4)
System.Text.Encodings.Web (2)
System.Text.Json (16)
System.Threading.RateLimiting (15)
System.Threading.Tasks.Dataflow (40)
Base\DataflowBlock.cs (11)
135if (!messageHeader.IsValid) throw new ArgumentException(SR.Argument_InvalidMessageHeader, nameof(messageHeader));
621if (!messageHeader.IsValid) throw new ArgumentException(SR.Argument_InvalidMessageHeader, nameof(messageHeader));
666if (!messageHeader.IsValid) throw new ArgumentException(SR.Argument_InvalidMessageHeader, nameof(messageHeader));
683if (!messageHeader.IsValid) throw new ArgumentException(SR.Argument_InvalidMessageHeader, nameof(messageHeader));
1149if (!messageHeader.IsValid) throw new ArgumentException(SR.Argument_InvalidMessageHeader, nameof(messageHeader));
1150if (source == null && consumeToAccept) throw new ArgumentException(SR.Argument_CantConsumeFromANullSource, nameof(consumeToAccept));
1462if (!messageHeader.IsValid) throw new ArgumentException(SR.Argument_InvalidMessageHeader, nameof(messageHeader));
2104if (!messageHeader.IsValid) throw new ArgumentException(SR.Argument_InvalidMessageHeader, nameof(messageHeader));
2105if (source == null && consumeToAccept) throw new ArgumentException(SR.Argument_CantConsumeFromANullSource, nameof(consumeToAccept));
2611if (!messageHeader.IsValid) throw new ArgumentException(SR.Argument_InvalidMessageHeader, nameof(messageHeader));
2616if (source == null) throw new ArgumentException(SR.Argument_CantConsumeFromANullSource, nameof(consumeToAccept));
System.Transactions.Local (15)
System.Web.Services.Description (6)
System.Windows.Controls.Ribbon (2)
System.Windows.Forms (146)
System.Windows.Forms.Analyzers.CSharp (1)
System.Windows.Forms.Design (13)
System.Windows.Forms.Primitives (3)
System.Windows.Forms.Tests (1)
System.Windows.Forms.UI.IntegrationTests (3)
System.Xaml (26)
src\Microsoft.DotNet.Wpf\src\Shared\MS\Utility\FrugalList.cs (6)
331throw new ArgumentException(SR.Format(SR.FrugalList_TargetMapCannotHoldAllData, oldList.ToString(), this.ToString()), nameof(oldList));
612throw new ArgumentException(SR.Format(SR.FrugalList_TargetMapCannotHoldAllData, oldList.ToString(), this.ToString()), nameof(oldList));
1096throw new ArgumentException(SR.Format(SR.FrugalList_TargetMapCannotHoldAllData, oldList.ToString(), this.ToString()), nameof(oldList));
1135throw new ArgumentException(SR.Format(SR.FrugalList_TargetMapCannotHoldAllData, oldList.ToString(), this.ToString()), nameof(oldList));
1424throw new ArgumentException(SR.Format(SR.FrugalList_TargetMapCannotHoldAllData, oldList.ToString(), this.ToString()), nameof(oldList));
1499throw new ArgumentException(SR.Format(SR.FrugalList_TargetMapCannotHoldAllData, oldList.ToString(), this.ToString()), nameof(oldList));
Templates.Blazor.Tests (2)
Templates.Blazor.WebAssembly.Auth.Tests (2)
Templates.Blazor.WebAssembly.Tests (2)
Templates.Mvc.Tests (2)
Templates.Tests (2)
Test.Utilities (4)
Text.Analyzers (4)
UIAutomationClient (2)
UIAutomationClientSideProviders (2)
UIAutomationTypes (1)
VersioningWebSite (1)
VisualBasicRuntimeTest (2)
Wasm.Performance.ConsoleHost (2)
xunit.assert (4)
xunit.console (1)