Esempio n. 1
0
 public override int GetHashCode()
 {
     unchecked
     {
         var hashCode = MinorVersion.GetHashCode();
         hashCode = (hashCode * 397) ^ MajorVersion.GetHashCode();
         hashCode = (hashCode * 397) ^ (PropMask?.GetHashCode() ?? 0);
         hashCode = (hashCode * 397) ^ (ForeColor?.GetHashCode() ?? 0);
         hashCode = (hashCode * 397) ^ (BackColor?.GetHashCode() ?? 0);
         hashCode = (hashCode * 397) ^ (int)VariousPropertyBits;
         hashCode = (hashCode * 397) ^ (Caption?.GetHashCode() ?? 0);
         hashCode = (hashCode * 397) ^ (int)PicturePosition;
         hashCode = (hashCode * 397) ^ (int)MousePointer;
         hashCode = (hashCode * 397) ^ (Accelerator?.GetHashCode() ?? 0);
         hashCode = (hashCode * 397) ^ (Size?.GetHashCode() ?? 0);
         hashCode = (hashCode * 397) ^ (Picture?.Length.GetHashCode() ?? 0);
         hashCode = (hashCode * 397) ^ (MouseIcon?.Length.GetHashCode() ?? 0);
         hashCode = (hashCode * 397) ^ (TextProps?.GetHashCode() ?? 0);
         hashCode = (hashCode * 397) ^ (int)MaxLength;
         hashCode = (hashCode * 397) ^ (int)BorderStyle;
         hashCode = (hashCode * 397) ^ (ScrollBars?.GetHashCode() ?? 0);
         hashCode = (hashCode * 397) ^ DisplayStyle.GetHashCode();
         hashCode = (hashCode * 397) ^ (PasswordChar?.GetHashCode() ?? 0);
         hashCode = (hashCode * 397) ^ (int)ListWidth;
         hashCode = (hashCode * 397) ^ BoundColumn.GetHashCode();
         hashCode = (hashCode * 397) ^ TextColumn.GetHashCode();
         hashCode = (hashCode * 397) ^ ColumnCount.GetHashCode();
         hashCode = (hashCode * 397) ^ ListRows.GetHashCode();
         hashCode = (hashCode * 397) ^ ColumnInfoCount.GetHashCode();
         hashCode = (hashCode * 397) ^ MatchEntry.GetHashCode();
         hashCode = (hashCode * 397) ^ ListStyle.GetHashCode();
         hashCode = (hashCode * 397) ^ ShowDropButtonWhen.GetHashCode();
         hashCode = (hashCode * 397) ^ DropButtonStyle.GetHashCode();
         hashCode = (hashCode * 397) ^ MultiSelect.GetHashCode();
         hashCode = (hashCode * 397) ^ (BorderColor?.GetHashCode() ?? 0);
         hashCode = (hashCode * 397) ^ (int)SpecialEffect;
         hashCode = (hashCode * 397) ^ (Value?.GetHashCode() ?? 0);
         hashCode = (hashCode * 397) ^ (GroupName?.GetHashCode() ?? 0);
         hashCode = (hashCode * 397) ^ (Remainder?.Length.GetHashCode() ?? 0);
         return(hashCode);
     }
 }
Esempio n. 2
0
        public override int GetHashCode()
        {
            unchecked // Overflow is fine, just wrap
            {
                int hashCode = 41;

                if (Label != null)
                {
                    hashCode = hashCode * 59 + Label.GetHashCode();
                }

                if (TickVals != null)
                {
                    hashCode = hashCode * 59 + TickVals.GetHashCode();
                }

                if (TickText != null)
                {
                    hashCode = hashCode * 59 + TickText.GetHashCode();
                }

                if (TickFormat != null)
                {
                    hashCode = hashCode * 59 + TickFormat.GetHashCode();
                }

                if (Visible != null)
                {
                    hashCode = hashCode * 59 + Visible.GetHashCode();
                }

                if (Range != null)
                {
                    hashCode = hashCode * 59 + Range.GetHashCode();
                }

                if (ConstraintRange != null)
                {
                    hashCode = hashCode * 59 + ConstraintRange.GetHashCode();
                }

                if (MultiSelect != null)
                {
                    hashCode = hashCode * 59 + MultiSelect.GetHashCode();
                }

                if (Values != null)
                {
                    hashCode = hashCode * 59 + Values.GetHashCode();
                }

                if (Name != null)
                {
                    hashCode = hashCode * 59 + Name.GetHashCode();
                }

                if (TemplateItemName != null)
                {
                    hashCode = hashCode * 59 + TemplateItemName.GetHashCode();
                }

                if (TickValsSrc != null)
                {
                    hashCode = hashCode * 59 + TickValsSrc.GetHashCode();
                }

                if (TickTextSrc != null)
                {
                    hashCode = hashCode * 59 + TickTextSrc.GetHashCode();
                }

                if (ValuesSrc != null)
                {
                    hashCode = hashCode * 59 + ValuesSrc.GetHashCode();
                }

                return(hashCode);
            }
        }