is there a way to retrieve the address of an object? (Or some id that is unique to the object)
I want to define the identity of an Edge based on the addresses of the Nodes it refers to.
But because GetHashCode doesnt guarantee uniqueness, this solution is unsafe:
public int CompareTo(Edge other)
int result = from.GetHashCode() - other.from.GetHashCode();
if(result != 0)
return to.GetHashCode() - other.to.GetHashCode();