Exemple #1
0
 /// <summary>
 /// Indicates whether the current object is equal to another object of the same type.
 /// </summary>
 /// <returns>
 /// true if the current object is equal to the <paramref name="other"/> parameter; otherwise, false.
 /// </returns>
 /// <param name="other">An object to compare with this object.
 ///                 </param>
 public bool Equals(ConstraintMetrics other)
 {
     if (ReferenceEquals(null, other))
     {
         return(false);
     }
     if (ReferenceEquals(this, other))
     {
         return(true);
     }
     return(base.Equals(other) && other.Width == Width && other.Height == Height);
 }
Exemple #2
0
        /// <summary>
        /// Creates a new object that is a copy of the current instance.
        /// </summary>
        /// <returns>
        /// A new object that is a copy of this instance.
        /// </returns>
        /// <filterpriority>2</filterpriority>
        public object Clone()
        {
            ConstraintMetrics metrics = new ConstraintMetrics
            {
                Left   = Left,
                Right  = Right,
                Top    = Top,
                Bottom = Bottom,
                Width  = Width,
                Height = Height
            };

            return(metrics);
        }
 /// <summary>
 /// Indicates whether the current object is equal to another object of the same type.
 /// </summary>
 /// <returns>
 /// true if the current object is equal to the <paramref name="other"/> parameter; otherwise, false.
 /// </returns>
 /// <param name="other">An object to compare with this object.
 ///                 </param>
 public bool Equals(ConstraintMetrics other)
 {
     if (ReferenceEquals(null, other)) return false;
     if (ReferenceEquals(this, other)) return true;
     return base.Equals(other) && other.Width == Width && other.Height == Height;
 }
        /// <summary>
        /// Creates a new object that is a copy of the current instance.
        /// </summary>
        /// <returns>
        /// A new object that is a copy of this instance.
        /// </returns>
        /// <filterpriority>2</filterpriority>
        public object Clone()
        {
            ConstraintMetrics metrics = new ConstraintMetrics
                                            {
                                                Left = Left,
                                                Right = Right,
                                                Top = Top,
                                                Bottom = Bottom,
                                                Width = Width,
                                                Height = Height
                                            };

            return metrics;
        }