Snippet: Equals and GetHashCode for value type

property value
IDE VS Code
Language C#
Title Equals and GetHashCode for value type
Shortcut equals_ValueType
Description overriding Equals and GetHashCode methods for value type

Placeholders

Identifier Tooltip Default Value
thisName Containing type name ThisName

Code

public override bool Equals(object obj) {
	if(!(obj is ThisName)) {
		return false;
	}

	var other = (ThisName)obj;

	
	throw new NotImplementedException();
}

public override int GetHashCode() {
	throw new NotImplementedException();
}