diff --git a/ICD.Common.Utils/Extensions/EnumerableExtensions.cs b/ICD.Common.Utils/Extensions/EnumerableExtensions.cs index d8cd021..41a14b9 100644 --- a/ICD.Common.Utils/Extensions/EnumerableExtensions.cs +++ b/ICD.Common.Utils/Extensions/EnumerableExtensions.cs @@ -186,6 +186,28 @@ namespace ICD.Common.Utils.Extensions return extends.TryElementAt(index, out output) ? output : defaultValue; } + /// + /// Compares the two sequences for identical values. + /// + /// + /// + /// + /// + /// + public static bool SequenceEqual(this IEnumerable extends, IEnumerable other, IEqualityComparer comparer) + { + if (extends == null) + throw new ArgumentNullException("extends"); + + if (other == null) + throw new ArgumentNullException("other"); + + if (comparer == null) + throw new ArgumentNullException("comparer"); + + return extends.SequenceEqual(other, comparer.Equals); + } + /// /// Compares the two sequences for identical values. ///