Skip to content

Commit ee7009e

Browse files
committed
Visual Studio requires these
1 parent 76a00bb commit ee7009e

File tree

2 files changed

+28
-0
lines changed

2 files changed

+28
-0
lines changed

System.Collections.Generic/DefaultEqualityComparer.cs

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,20 @@ public int GetHashCode(object obj)
5151

5252
return GetHashCode ((T)obj);
5353
}
54+
55+
public bool Equals(object x, object y)
56+
{
57+
58+
if (x == null || y == null) {
59+
return false;
60+
}
61+
62+
if (!(x is T) || !(y is T)) {
63+
return false;
64+
}
65+
66+
return Equals((T)x, (T)y);
67+
}
5468
}
5569
}
5670

System.Collections.Generic/GenericEqualityComparer.cs

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,20 @@ public int GetHashCode(object obj)
5353

5454
return GetHashCode ((T)obj);
5555
}
56+
57+
public bool Equals(object x, object y)
58+
{
59+
60+
if(x == null || y == null) {
61+
return false;
62+
}
63+
64+
if(!(x is T) || !(y is T)) {
65+
return false;
66+
}
67+
68+
return Equals((T)x, (T)y);
69+
}
5670
}
5771
}
5872

0 commit comments

Comments
 (0)