Updated Exception Handling for Collection<T> (#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)
commit01adae878ded6fe51f6def1370255d816ab42d78
tree02fc0ad76ee843ae4b3355d3daada8838552b7c5
parentbadf173369fa09d33893017ec201cbeb39da3b9c
Updated Exception Handling for Collection<T> (#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'
src/System.Private.CoreLib/shared/System/Collections/ObjectModel/Collection.cs