public override bool Equals(Object o) { if (!(o is RefKey)) return false; RefKey other = (RefKey)o; return this.gen == other.gen && this.num == other.num; }