diff --git a/ICD.Common.Utils/Extensions/CollectionExtensions.cs b/ICD.Common.Utils/Extensions/CollectionExtensions.cs
index 19b7050..c77ded3 100644
--- a/ICD.Common.Utils/Extensions/CollectionExtensions.cs
+++ b/ICD.Common.Utils/Extensions/CollectionExtensions.cs
@@ -9,23 +9,6 @@ namespace ICD.Common.Utils.Extensions
///
public static class CollectionExtensions
{
- ///
- /// Removes items matching the predicate.
- ///
- ///
- ///
- ///
- public static void RemoveAll(this ICollection extends, Func predicate)
- {
- if (extends == null)
- throw new ArgumentNullException("extends");
-
- if (predicate == null)
- throw new ArgumentNullException("predicate");
-
- extends.RemoveAll(extends.Where(predicate).ToArray());
- }
-
///
/// Removes all of the items from the other collection.
///
@@ -40,7 +23,24 @@ namespace ICD.Common.Utils.Extensions
if (other == null)
throw new ArgumentNullException("other");
- foreach (T item in other)
+ extends.RemoveAll(i => other.Contains(i));
+ }
+
+ ///
+ /// Removes items matching the predicate.
+ ///
+ ///
+ ///
+ ///
+ public static void RemoveAll(this ICollection extends, Func predicate)
+ {
+ if (extends == null)
+ throw new ArgumentNullException("extends");
+
+ if (predicate == null)
+ throw new ArgumentNullException("predicate");
+
+ foreach (T item in extends.Where(predicate).ToArray())
extends.Remove(item);
}
}
diff --git a/ICD.Common.Utils/Xml/XmlReaderExtensions.cs b/ICD.Common.Utils/Xml/XmlReaderExtensions.cs
index 3ca946b..87b8617 100644
--- a/ICD.Common.Utils/Xml/XmlReaderExtensions.cs
+++ b/ICD.Common.Utils/Xml/XmlReaderExtensions.cs
@@ -42,7 +42,7 @@ namespace ICD.Common.Utils.Xml
throw new ArgumentNullException("extends");
if (!extends.HasAttributes)
- return new IcdXmlAttribute[0];
+ return Enumerable.Empty();
List attributes = new List();
while (extends.MoveToNextAttribute())