Snippet: IEqualityComparer class

property value
IDE VS Code
Language C#
Title IEqualityComparer class
Shortcut c_IEqualityComparer
Description class that implements IEqualityComparer

Placeholders

Identifier Tooltip Default Value
modifier Modifier(s) public
name Equality comparer type name EqualityComparer
type Type name object

Code

public class EqualityComparer : IEqualityComparer {
	new public bool Equals(object x, object y) {
		if (object.ReferenceEquals(x, y)) {
			return true;
		}

		if (x == null || y == null) {
			return false;
		}

		var a = (object)x;
		var b = (object)y;

		
		throw new NotImplementedException();
	}

	public int GetHashCode(object obj) {
		if (obj == null) {
			return 0;
		}

		throw new NotImplementedException();
	}
}