示例#1
0
        public int GetHashCode(T list)
        {
            var hashBuilder = new HashCodeBuilder();

            hashBuilder.Append(list.Count);
            foreach (var item in list)
            {
                hashBuilder.Append(item);
            }
            return(hashBuilder.HashCode);
        }
示例#2
0
        public override int GetHashCode()
        {
            var hashBuilder = new HashCodeBuilder();

            hashBuilder.Append(logfont.lfWidth);
            hashBuilder.Append(logfont.lfEscapement);
            hashBuilder.Append(logfont.lfOrientation);
            hashBuilder.Append(logfont.lfWeight);
            hashBuilder.Append(logfont.lfItalic);
            hashBuilder.Append(logfont.lfUnderline);
            hashBuilder.Append(logfont.lfStrikeOut);
            hashBuilder.Append(logfont.lfCharSet);
            hashBuilder.Append(logfont.lfClipPrecision);
            hashBuilder.Append(logfont.lfClipPrecision);
            hashBuilder.Append(logfont.lfQuality);
            hashBuilder.Append(logfont.lfPitchAndFamily);
            hashBuilder.Append(logfont.lfFaceName);
            hashBuilder.Append(logfont.lfHeight);
            return(hashBuilder.HashCode);
        }