Updated Exception Handling for Collection<T> (dotnet/coreclr#23290)
authorAndrew Hoefling <andrew@hoeflingsoftware.com>
Fri, 22 Mar 2019 02:23:53 +0000 (22:23 -0400)
committerStephen Toub <stoub@microsoft.com>
Fri, 22 Mar 2019 02:23:53 +0000 (22:23 -0400)
commit59953fff3f68fecf940cceb0a6c066ae8c81c002
tree5bdcbf6efd9364096c609062de55263749bb1ac7
parent97c693d2ca86927a9f5d09de4cd12111c7934a13
Updated Exception Handling for Collection<T> (dotnet/coreclr#23290)

* Updated Argument Helper param from list->collection since the parameter name is collection

* Updated exception message to use an out of range exception that doesn't explicitly reference a list

* Simplified if statements that verify if the index is out of range

* Updated if logic to be simplified using (uint)

* Updated exception handling to throw ThrowHelper.ThrowArgumentOutOfRange_IndexException() when the ExceptionArgument was 'Index'

Commit migrated from https://github.com/dotnet/coreclr/commit/01adae878ded6fe51f6def1370255d816ab42d78
src/libraries/System.Private.CoreLib/src/System/Collections/ObjectModel/Collection.cs