GetHashCode() public method

Serves as a hash function for a particular type.
public GetHashCode ( ) : int
return int
Ejemplo n.º 1
0
        /// <summary>
        /// Serves as a hash function for a particular type.
        /// </summary>
        /// <returns>
        /// A hash code for the current Entity Model.
        /// </returns>
        public override int GetHashCode()
        {
            int h0 = Id?.GetHashCode() ?? base.GetHashCode();
            int h1 = HtmlClasses?.GetHashCode() ?? 0;
            int h2 = MvcData?.GetHashCode() ?? 0;

            return(Hash.CombineHashCodes(h0, h1, h2));
        }