public override bool Equals(object obj) { if (obj == this) { return(true); } if (obj == null || obj.GetType() != this.GetType()) { return(false); } Vector vc = (Vector)obj; bool equalComponent = true; if (vc.GetSize() == GetSize()) { for (int i = 0; i < vc.vector.Length; i++) { if (vc.GetComponentByIndex(i) != GetComponentByIndex(i)) { equalComponent = false; } } } return(equalComponent); }