Compare() public static method

public static Compare ( SortKey sortkey1, SortKey sortkey2 ) : int
sortkey1 SortKey
sortkey2 SortKey
return int
Beispiel #1
0
        /// <summary>确定指定的对象是否等于当前的 <see cref="T:System.Globalization.SortKey" /> 对象。</summary>
        /// <returns>如果 <paramref name="value" /> 参数等于当前的 <see cref="T:System.Globalization.SortKey" /> 对象,则为 true;否则为 false。</returns>
        /// <param name="value">将与当前 <see cref="T:System.Globalization.SortKey" /> 对象进行比较的对象。 </param>
        /// <exception cref="T:System.ArgumentNullException">
        /// <paramref name="value" /> is null.</exception>
        public override bool Equals(object value)
        {
            SortKey sortkey2 = value as SortKey;

            if (sortkey2 != null)
            {
                return(SortKey.Compare(this, sortkey2) == 0);
            }
            return(false);
        }
Beispiel #2
0
        /// <summary>Determines whether the specified object is equal to the current <see cref="T:System.Globalization.SortKey" /> object.</summary>
        /// <returns>true if the <paramref name="value" /> parameter is equal to the current <see cref="T:System.Globalization.SortKey" /> object; otherwise, false. </returns>
        /// <param name="value">The object to compare with the current <see cref="T:System.Globalization.SortKey" /> object. </param>
        /// <exception cref="T:System.ArgumentNullException">
        ///   <paramref name="value" /> is null.</exception>
        public override bool Equals(object value)
        {
            SortKey sortKey = value as SortKey;

            return(sortKey != null && this.lcid == sortKey.lcid && this.options == sortKey.options && SortKey.Compare(this, sortKey) == 0);
        }
        /// <summary>Determines whether the specified object is equal to the current <see cref="T:System.Globalization.SortKey" /> object.</summary>
        /// <param name="value">The object to compare with the current <see cref="T:System.Globalization.SortKey" /> object. </param>
        /// <returns>
        ///     <see langword="true" /> if the <paramref name="value" /> parameter is equal to the current <see cref="T:System.Globalization.SortKey" /> object; otherwise, <see langword="false" />. </returns>
        /// <exception cref="T:System.ArgumentNullException">
        ///         <paramref name="value" /> is <see langword="null" />.</exception>
        // Token: 0x06003044 RID: 12356 RVA: 0x000B90B4 File Offset: 0x000B72B4
        public override bool Equals(object value)
        {
            SortKey sortKey = value as SortKey;

            return(sortKey != null && SortKey.Compare(this, sortKey) == 0);
        }