예제 #1
0
        /// <summary>
        /// Determines whether the specified object is equal to the current object.
        /// </summary>
        /// <param name="other">The <see cref="UiListItem"/> to compare with the current <see cref="UiListItem"/>.</param>
        /// <returns><c>true</c> if the specified object is equal to the current object; otherwise, <c>false</c>.</returns>
        /// <stable>ICU 55</stable>
        public bool Equals(UiListItem other)
        {
            if (ReferenceEquals(this, other))
            {
                return(true);
            }

            return(NameInDisplayLocale.Equals(other.NameInDisplayLocale) &&
                   NameInSelf.Equals(other.NameInSelf) &&
                   Minimized.Equals(other.Minimized) &&
                   Modified.Equals(other.Modified));
        }
예제 #2
0
        /// <summary>
        /// Determines whether the specified object is equal to the current object.
        /// </summary>
        /// <param name="obj">The object to compare with the current object.</param>
        /// <returns>true if the specified object is equal to the current object; otherwise, false.</returns>
        /// <stable>ICU 55</stable>
        public override bool Equals(object obj)
        {
            if (this == obj)
            {
                return(true);
            }
            if (obj == null || !(obj is UiListItem))
            {
                return(false);
            }
            UiListItem other = (UiListItem)obj;

            return(NameInDisplayLocale.Equals(other.NameInDisplayLocale) &&
                   NameInSelf.Equals(other.NameInSelf) &&
                   Minimized.Equals(other.Minimized) &&
                   Modified.Equals(other.Modified));
        }
예제 #3
0
 /// <summary>
 /// Gets the hash code for this instance.
 /// </summary>
 /// <returns>A hash code for the current object.</returns>
 /// <stable>ICU 55</stable>
 public override int GetHashCode()
 {
     return(Modified.GetHashCode() ^ NameInDisplayLocale.GetHashCode());
 }