Updated RemoveRange invocation of RemoveAt to use index instead of i, because the...
authorAndrew Hoefling <andrew@hoeflingsoftware.com>
Tue, 5 Mar 2019 23:15:08 +0000 (18:15 -0500)
committerSantiago Fernandez Madero <safern@microsoft.com>
Fri, 8 Mar 2019 19:20:58 +0000 (11:20 -0800)
commit0ff8f831b323d5be88dd4983651ac5da8c038110
tree81b31ce23d91bf46bac05cbc32931121dede53f6
parent0ad4a13390d29ae77eb23cdd4152ef3f59791ec7
Updated RemoveRange invocation of RemoveAt to use index instead of i, because the array changes with each iteration of the for loop and will cause side-effects which may include index out of range exceptions. This needs to be index because as the array shrinks the index is always at the correct position.

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