diff options
author | stephentoub <stoub@microsoft.com> | 2016-01-13 18:29:39 -0500 |
---|---|---|
committer | stephentoub <stoub@microsoft.com> | 2016-01-13 18:29:39 -0500 |
commit | c3b5d9a1792b66c969c00cf18933330d38788c33 (patch) | |
tree | c28cb0bd069f7415d0e72acac05faa125a042988 /src | |
parent | 6e4da99f2a9325ad825ead28bcbfa814d04d360f (diff) | |
download | coreclr-c3b5d9a1792b66c969c00cf18933330d38788c33.tar.gz coreclr-c3b5d9a1792b66c969c00cf18933330d38788c33.tar.bz2 coreclr-c3b5d9a1792b66c969c00cf18933330d38788c33.zip |
Fix incorrect ArgumentException names in List<T>
Diffstat (limited to 'src')
-rw-r--r-- | src/mscorlib/src/System/Collections/Generic/List.cs | 4 | ||||
-rw-r--r-- | src/mscorlib/src/System/ThrowHelper.cs | 10 |
2 files changed, 12 insertions, 2 deletions
diff --git a/src/mscorlib/src/System/Collections/Generic/List.cs b/src/mscorlib/src/System/Collections/Generic/List.cs index 8572dabca1..b7d261a080 100644 --- a/src/mscorlib/src/System/Collections/Generic/List.cs +++ b/src/mscorlib/src/System/Collections/Generic/List.cs @@ -539,7 +539,7 @@ namespace System.Collections.Generic { public void ForEach(Action<T> action) { if( action == null) { - ThrowHelper.ThrowArgumentNullException(ExceptionArgument.match); + ThrowHelper.ThrowArgumentNullException(ExceptionArgument.action); } Contract.EndContractBlock(); @@ -991,7 +991,7 @@ namespace System.Collections.Generic { public void Sort(Comparison<T> comparison) { if( comparison == null) { - ThrowHelper.ThrowArgumentNullException(ExceptionArgument.match); + ThrowHelper.ThrowArgumentNullException(ExceptionArgument.comparison); } Contract.EndContractBlock(); diff --git a/src/mscorlib/src/System/ThrowHelper.cs b/src/mscorlib/src/System/ThrowHelper.cs index b050dbc4a7..1fbce9abe0 100644 --- a/src/mscorlib/src/System/ThrowHelper.cs +++ b/src/mscorlib/src/System/ThrowHelper.cs @@ -128,6 +128,10 @@ namespace System { string argumentName = null; switch (argument) { + case ExceptionArgument.action: + argumentName = "action"; + break; + case ExceptionArgument.array: argumentName = "array"; break; @@ -144,6 +148,10 @@ namespace System { argumentName = "collection"; break; + case ExceptionArgument.comparison: + argumentName = "comparison"; + break; + case ExceptionArgument.list: argumentName = "list"; break; @@ -463,6 +471,8 @@ namespace System { options, view, sourceBytesToCopy, + action, + comparison } // |