Listing 1

public ref class Point
{
    ...
    virtual int GetHashCode() override;
};
int Point::GetHashCode() override
{
    return X ^ (Y << 1);
}