コード例 #1
0
        /// <summary>
        /// Porównuje czy jeden System.Object jest równy drugiemu
        /// </summary>
        /// <param name="o">System.Object do porównania.</param>
        /// <returns>Równy czy nie.</returns>
        public override bool Equals(object obj)
        {
            TMPlayerEntry other = obj as TMPlayerEntry;

            if (other != null)
            {
                return(Equals(other));
            }
            else
            {
                return(false);
            }
        }
コード例 #2
0
        /// <summary>
        /// Porównuje czy jeden obiekt Entry jest równy drugiemu
        /// </summary>
        /// <param name="other">Obiekt Selection do porównania.</param>
        /// <returns>Równy czy nie.</returns>
        public override bool Equals(Entry other)
        {
            TMPlayerEntry otherTMPlayerEntry = other as TMPlayerEntry;

            if (otherTMPlayerEntry != null)
            {
                return((this.Text == otherTMPlayerEntry.Text) &&
                       base.Equals(otherTMPlayerEntry));
            }
            else
            {
                return(false);
            }
        }