Пример #1
0
        public override bool Equals(object obj)
        {
            if (!(obj is PointF))
            {
                return(false);
            }
            PointF tf = (PointF)obj;

            return(((tf.X == this.X) && (tf.Y == this.Y)) && tf.GetType().Equals(base.GetType()));
        }
Пример #2
0
        /// <summary>Specifies whether this <see cref="T:System.Drawing.PointF" /> contains the same coordinates as the specified <see cref="T:System.Object" />.</summary>
        /// <returns>This method returns true if <paramref name="obj" /> is a <see cref="T:System.Drawing.PointF" /> and has the same coordinates as this <see cref="T:System.Drawing.Point" />.</returns>
        /// <param name="obj">The <see cref="T:System.Object" /> to test. </param>
        /// <filterpriority>1</filterpriority>
        public override bool Equals(object obj)
        {
            if (!(obj is PointF))
            {
                return(false);
            }
            PointF pointF = (PointF)obj;

            return(pointF.X == this.X && pointF.Y == this.Y && pointF.GetType().Equals(base.GetType()));
        }
Пример #3
0
        /// <include file='doc\PointF.uex' path='docs/doc[@for="PointF.Equals"]/*' />
        /// <devdoc>
        ///    <para>[To be supplied.]</para>
        /// </devdoc>
        public override bool Equals(object obj)
        {
            if (!(obj is PointF))
            {
                return(false);
            }
            PointF comp = (PointF)obj;

            return
                (comp.X == this.X &&
                 comp.Y == this.Y &&
                 comp.GetType().Equals(this.GetType()));
        }