public override bool Equals(object obj) { if (obj == null || !(obj is Vector)) { return false; } var vector = ((Vector)obj); return vector.X == this.X && vector.Y == this.Y && vector.Z == this.Z; }