From c8ca62059a45535ae3740f3f63c295a694dd18dd Mon Sep 17 00:00:00 2001 From: "David G. Moore, Jr." Date: Sat, 2 Mar 2024 03:15:08 -0500 Subject: [PATCH] UPDATED: System.Linq.cs, DmjrsLinqExtensions - Commented out a block of code that removes a range of items from a collection - Updated the code to use a lambda expression instead of a foreach loop to remove items --- System/System.Linq/System.Linq.cs | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/System/System.Linq/System.Linq.cs b/System/System.Linq/System.Linq.cs index 7c8fdb5..a7d8ffe 100644 --- a/System/System.Linq/System.Linq.cs +++ b/System/System.Linq/System.Linq.cs @@ -97,14 +97,14 @@ IEnumerable removeRange { if (removeRange != null) { - if (collection is IList list) - { - list.RemoveRange(removeRange); - } - else - { + // if (collection is List list) + // { + // list.RemoveRange(removeRange); + // } + // else + // { removeRange.ForEach(item => collection.Remove(item)); - } + // } } return collection; }