diff --git a/ICD.Common.Utils/Comparers/SequenceComparer.cs b/ICD.Common.Utils/Comparers/SequenceComparer.cs index aac843a..d402d63 100644 --- a/ICD.Common.Utils/Comparers/SequenceComparer.cs +++ b/ICD.Common.Utils/Comparers/SequenceComparer.cs @@ -29,11 +29,12 @@ namespace ICD.Common.Utils.Comparers public int Compare(IEnumerable x, IEnumerable y) { + if (x == null && y == null) + return 0; if (x == null) - throw new ArgumentNullException("x"); - + return -1; if (y == null) - throw new ArgumentNullException("y"); + return 1; using (IEnumerator firstPos = x.GetEnumerator()) { diff --git a/ICD.Common.Utils/Comparers/UndefinedVersionComparer.cs b/ICD.Common.Utils/Comparers/UndefinedVersionComparer.cs index 1476d51..e00b0a1 100644 --- a/ICD.Common.Utils/Comparers/UndefinedVersionComparer.cs +++ b/ICD.Common.Utils/Comparers/UndefinedVersionComparer.cs @@ -19,6 +19,13 @@ namespace ICD.Common.Utils.Comparers public int Compare(Version x, Version y) { + if (x == null && y == null) + return 0; + if (x == null) + return -1; + if (y == null) + return 1; + return x.ClearUndefined() .CompareTo(y.ClearUndefined()); }