Can Hash Functions take fixed-size input?
The C#/.NET GetHashCode() is not a cryptographic hash function.  As a non-cryptographic hash function I think what you've written is reasonable assuming that X and Y are the only &quot;public&quot; properties that make up the object.
Having said that, cryptographic hash functions are very different both in implementation and purpose than C#/.NET/Java hash codes and probably other languages as well, so you might want to take this question to a more appropriate venue.