int.GetHashCode()

Here are the examples of the csharp api int.GetHashCode() taken from open source projects. By voting up you can indicate which examples are most useful and appropriate.

2470 Examples 7

19 Source : ModDefinition.cs
with GNU General Public License v3.0
from Artentus

public override int GetHashCode()
            => Uid.GetHashCode() ^ Name.GetHashCode() ^ Version.GetHashCode() ^ FactorioVersion.GetHashCode();

19 Source : GameInfo.cs
with MIT License
from Ashesh3

public override int GetHashCode()
            => SubId.GetHashCode();

19 Source : Vector2I.cs
with GNU General Public License v3.0
from askeladdk

public override int GetHashCode()
		{
			unchecked
			{
				var hash = (int)2166136261;
				hash = (16777619 * hash) ^ x.GetHashCode();
				hash = (16777619 * hash) ^ y.GetHashCode();
				return hash;
			}
		}

19 Source : BaseEntity.cs
with MIT License
from aspnetrun

public override int GetHashCode()
        {
            return (GetType().GetHashCode() * 907) + Id.GetHashCode();
        }

19 Source : SemVersion.cs
with MIT License
from Assistant

public override int GetHashCode()
        {
            unchecked
            {
                // TODO verify this. Some versions start result = 17. Some use 37 instead of 31
                int result = Major.GetHashCode();
                result = result * 31 + Minor.GetHashCode();
                result = result * 31 + Patch.GetHashCode();
                result = result * 31 + Prerelease.GetHashCode();
                result = result * 31 + Build.GetHashCode();
                return result;
            }
        }

19 Source : FName.cs
with MIT License
from atenfyr

public override int GetHashCode()
        {
            return Value.GetHashCode() ^ Number.GetHashCode();
        }

19 Source : FPackageIndex.cs
with MIT License
from atenfyr

public override int GetHashCode()
        {
            return Index.GetHashCode();
        }

19 Source : MeshPrimitive.cs
with Apache License 2.0
from atteneder

public override int GetHashCode()
        {
            int hash = 13;
            hash = hash * 7 + POSITION.GetHashCode();
            hash = hash * 7 + NORMAL.GetHashCode();
            hash = hash * 7 + TANGENT.GetHashCode();
            hash = hash * 7 + TEXCOORD_0.GetHashCode();
            hash = hash * 7 + TEXCOORD_1.GetHashCode();
            hash = hash * 7 + COLOR_0.GetHashCode();
            return hash;
        }

19 Source : MeshPrimitive.cs
with Apache License 2.0
from atteneder

public override int GetHashCode()
        {
            int hash = 13;
            hash = hash * 7 + POSITION.GetHashCode();
            hash = hash * 7 + NORMAL.GetHashCode();
            hash = hash * 7 + TANGENT.GetHashCode();
            return hash;
        }

19 Source : Priority.cs
with MIT License
from audinowho

public override int GetHashCode()
        {
            int hash = 0;
            if (this.str == null)
                return hash;

            foreach (int member in this.str)
                hash ^= member.GetHashCode();

            return hash;
        }

19 Source : RandRange.cs
with MIT License
from audinowho

public override int GetHashCode() => unchecked(191 + (this.Min.GetHashCode() * 313) ^ (this.Max.GetHashCode() * 739));

19 Source : IntRange.cs
with MIT License
from audinowho

public override int GetHashCode()
        {
            return this.Min.GetHashCode() ^ this.Max.GetHashCode();
        }

19 Source : Loc.cs
with MIT License
from audinowho

public override int GetHashCode()
        {
            return this.X.GetHashCode() ^ this.Y.GetHashCode();
        }

19 Source : Rect.cs
with MIT License
from audinowho

public override int GetHashCode()
        {
            return this.X.GetHashCode() ^ this.Y.GetHashCode() ^ this.Width.GetHashCode() ^ this.Height.GetHashCode();
        }

19 Source : BlobMap.cs
with MIT License
from audinowho

public override int GetHashCode()
            {
                return this.Bounds.GetHashCode() ^ this.Area.GetHashCode();
            }

19 Source : RoomHallIndex.cs
with MIT License
from audinowho

public override int GetHashCode()
        {
            return this.IsHall.GetHashCode() ^ this.Index.GetHashCode();
        }

19 Source : User.cs
with MIT License
from Auros

public override int GetHashCode() => ID.GetHashCode();

19 Source : Bearer.cs
with Apache License 2.0
from Autodesk-Forge

public override int GetHashCode()
        {
            // credit: http://stackoverflow.com/a/263416/677735
            unchecked // Overflow is fine, just wrap
            {
                int hash = 41;
                // Suitable nullity checks etc, of course :)
                if (this.TokenType != null)
                    hash = hash * 59 + this.TokenType.GetHashCode();
                if (this.ExpiresIn != null)
                    hash = hash * 59 + this.ExpiresIn.GetHashCode();
                if (this.AccessToken != null)
                    hash = hash * 59 + this.AccessToken.GetHashCode();
                if (this.RefreshToken != null)
                    hash = hash * 59 + this.RefreshToken.GetHashCode();
                return hash;
            }
        }

19 Source : Engine.cs
with Apache License 2.0
from Autodesk-Forge

public override int GetHashCode()
        {
            // credit: http://stackoverflow.com/a/263416/677735
            unchecked // Overflow is fine, just wrap
            {
                int hash = 41;
                // Suitable nullity checks etc, of course :)
                if (this.Id != null)
                    hash = hash * 59 + this.Id.GetHashCode();
                if (this.Resource != null)
                    hash = hash * 59 + this.Resource.GetHashCode();
                if (this.IsPublic != null)
                    hash = hash * 59 + this.IsPublic.GetHashCode();
                if (this.Version != null)
                    hash = hash * 59 + this.Version.GetHashCode();
                if (this.Timestamp != null)
                    hash = hash * 59 + this.Timestamp.GetHashCode();
                if (this.Description != null)
                    hash = hash * 59 + this.Description.GetHashCode();
                return hash;
            }
        }

19 Source : FolderAttributes.cs
with Apache License 2.0
from Autodesk-Forge

public override int GetHashCode()
        {
            // credit: http://stackoverflow.com/a/263416/677735
            unchecked // Overflow is fine, just wrap
            {
                int hash = 41;
                // Suitable nullity checks etc, of course :)
                if (this.Name != null)
                    hash = hash * 59 + this.Name.GetHashCode();
                if (this.DisplayName != null)
                    hash = hash * 59 + this.DisplayName.GetHashCode();
                if (this.ObjectCount != null)
                    hash = hash * 59 + this.ObjectCount.GetHashCode();
                if (this.Extension != null)
                    hash = hash * 59 + this.Extension.GetHashCode();
                return hash;
            }
        }

19 Source : JobThumbnailOutputPayloadAdvanced.cs
with Apache License 2.0
from Autodesk-Forge

public override int GetHashCode()
        {
            // credit: http://stackoverflow.com/a/263416/677735
            unchecked // Overflow is fine, just wrap
            {
                int hash = 41;
                // Suitable nullity checks etc, of course :)
                if (this.Width != null)
                    hash = hash * 59 + this.Width.GetHashCode();
                if (this.Height != null)
                    hash = hash * 59 + this.Height.GetHashCode();
                return hash;
            }
        }

19 Source : MetadataCollection.cs
with Apache License 2.0
from Autodesk-Forge

public override int GetHashCode()
        {
            // credit: http://stackoverflow.com/a/263416/677735
            unchecked // Overflow is fine, just wrap
            {
                int hash = 41;
                // Suitable nullity checks etc, of course :)
                if (this.Objectid != null)
                    hash = hash * 59 + this.Objectid.GetHashCode();
                if (this.Name != null)
                    hash = hash * 59 + this.Name.GetHashCode();
                if (this.Properties != null)
                    hash = hash * 59 + this.Properties.GetHashCode();
                return hash;
            }
        }

19 Source : MetadataObject.cs
with Apache License 2.0
from Autodesk-Forge

public override int GetHashCode()
        {
            // credit: http://stackoverflow.com/a/263416/677735
            unchecked // Overflow is fine, just wrap
            {
                int hash = 41;
                // Suitable nullity checks etc, of course :)
                if (this.Objectid != null)
                    hash = hash * 59 + this.Objectid.GetHashCode();
                if (this.Name != null)
                    hash = hash * 59 + this.Name.GetHashCode();
                if (this.Objects != null)
                    hash = hash * 59 + this.Objects.GetHashCode();
                return hash;
            }
        }

19 Source : ObjectFullDetails.cs
with Apache License 2.0
from Autodesk-Forge

public override int GetHashCode()
        {
            // credit: http://stackoverflow.com/a/263416/677735
            unchecked // Overflow is fine, just wrap
            {
                int hash = 41;
                // Suitable nullity checks etc, of course :)
                if (this.BucketKey != null)
                    hash = hash * 59 + this.BucketKey.GetHashCode();
                if (this.ObjectId != null)
                    hash = hash * 59 + this.ObjectId.GetHashCode();
                if (this.ObjectKey != null)
                    hash = hash * 59 + this.ObjectKey.GetHashCode();
                if (this.Sha1 != null)
                    hash = hash * 59 + this.Sha1.GetHashCode();
                if (this.Size != null)
                    hash = hash * 59 + this.Size.GetHashCode();
                if (this.ContentType != null)
                    hash = hash * 59 + this.ContentType.GetHashCode();
                if (this.Location != null)
                    hash = hash * 59 + this.Location.GetHashCode();
                if (this.BlockSizes != null)
                    hash = hash * 59 + this.BlockSizes.GetHashCode();
                if (this.Deltas != null)
                    hash = hash * 59 + this.Deltas.GetHashCode();
                return hash;
            }
        }

19 Source : ObjectFullDetailsDeltas.cs
with Apache License 2.0
from Autodesk-Forge

public override int GetHashCode()
        {
            // credit: http://stackoverflow.com/a/263416/677735
            unchecked // Overflow is fine, just wrap
            {
                int hash = 41;
                // Suitable nullity checks etc, of course :)
                if (this.Position != null)
                    hash = hash * 59 + this.Position.GetHashCode();
                if (this.Sha1 != null)
                    hash = hash * 59 + this.Sha1.GetHashCode();
                return hash;
            }
        }

19 Source : ObjectDetails.cs
with Apache License 2.0
from Autodesk-Forge

public override int GetHashCode()
        {
            // credit: http://stackoverflow.com/a/263416/677735
            unchecked // Overflow is fine, just wrap
            {
                int hash = 41;
                // Suitable nullity checks etc, of course :)
                if (this.BucketKey != null)
                    hash = hash * 59 + this.BucketKey.GetHashCode();
                if (this.ObjectId != null)
                    hash = hash * 59 + this.ObjectId.GetHashCode();
                if (this.ObjectKey != null)
                    hash = hash * 59 + this.ObjectKey.GetHashCode();
                if (this.Sha1 != null)
                    hash = hash * 59 + this.Sha1.GetHashCode();
                if (this.Size != null)
                    hash = hash * 59 + this.Size.GetHashCode();
                if (this.ContentType != null)
                    hash = hash * 59 + this.ContentType.GetHashCode();
                if (this.Location != null)
                    hash = hash * 59 + this.Location.GetHashCode();
                return hash;
            }
        }

19 Source : PostBucketsSigned.cs
with Apache License 2.0
from Autodesk-Forge

public override int GetHashCode()
        {
            // credit: http://stackoverflow.com/a/263416/677735
            unchecked // Overflow is fine, just wrap
            {
                int hash = 41;
                // Suitable nullity checks etc, of course :)
                if (this.MinutesExpiration != null)
                    hash = hash * 59 + this.MinutesExpiration.GetHashCode();
                return hash;
            }
        }

19 Source : File.cs
with MIT License
from Autodesk-Forge

public override int GetHashCode()
        {
            unchecked
            {
                int hash = 17;
                if (Id != null)
                    hash = hash * 486187739 + Id.GetHashCode();
                if (FileGuid != null)
                    hash = hash * 486187739 + FileGuid.GetHashCode();
                if (FileName != null)
                    hash = hash * 486187739 + FileName.GetHashCode();
                if (FileUrn != null)
                    hash = hash * 486187739 + FileUrn.GetHashCode();
                if (FilePath != null)
                    hash = hash * 486187739 + FilePath.GetHashCode();
                if (FileType != null)
                    hash = hash * 486187739 + FileType.GetHashCode();
                if (FileVersion != null)
                    hash = hash * 486187739 + FileVersion.GetHashCode();
                hash = hash * 486187739 + PublishedViewsCount.GetHashCode();
                hash = hash * 486187739 + PublishedSheetsCount.GetHashCode();
                hash = hash * 486187739 + FileSize.GetHashCode();
                if (FileModifiedDate != null)
                    hash = hash * 486187739 + FileModifiedDate.GetHashCode();
                if (UserCreate != null)
                    hash = hash * 486187739 + UserCreate.GetHashCode();
                if (UserLastModified != null)
                    hash = hash * 486187739 + UserLastModified.GetHashCode();
                return hash;
            }
        }

19 Source : VersionAttributes.cs
with Apache License 2.0
from Autodesk-Forge

public override int GetHashCode()
        {
            // credit: http://stackoverflow.com/a/263416/677735
            unchecked // Overflow is fine, just wrap
            {
                int hash = 41;
                // Suitable nullity checks etc, of course :)
                if (this.Name != null)
                    hash = hash * 59 + this.Name.GetHashCode();
                if (this.DisplayName != null)
                    hash = hash * 59 + this.DisplayName.GetHashCode();
                if (this.VersionNumber != null)
                    hash = hash * 59 + this.VersionNumber.GetHashCode();
                if (this.MimeType != null)
                    hash = hash * 59 + this.MimeType.GetHashCode();
                if (this.FileType != null)
                    hash = hash * 59 + this.FileType.GetHashCode();
                if (this.StorageSize != null)
                    hash = hash * 59 + this.StorageSize.GetHashCode();
                if (this.Extension != null)
                    hash = hash * 59 + this.Extension.GetHashCode();
                return hash;
            }
        }

19 Source : ValueObject.cs
with MIT License
from AutoFixture

public override int GetHashCode()
        {
            return
                this.X.GetHashCode() ^
                this.Y.GetHashCode();
        }

19 Source : XpressionMapper.Structs.Tests.cs
with MIT License
from AutoMapper

public override int GetHashCode()
        {
            return this.val.GetHashCode();
        }

19 Source : XpressionMapper.Structs.Tests.cs
with MIT License
from AutoMapper

public override int GetHashCode()
        {
            return Year.GetHashCode();
        }

19 Source : GifRect.cs
with MIT License
from AvaloniaUI

public override int GetHashCode()
        {
            return X.GetHashCode() ^ Y.GetHashCode() | Width.GetHashCode() ^ Height.GetHashCode();
        }

19 Source : TextLocation.cs
with MIT License
from AvaloniaUI

public override int GetHashCode()
        {
            return unchecked(191 * Column.GetHashCode() ^ Line.GetHashCode());
        }

19 Source : HighlightingColor.cs
with MIT License
from AvaloniaUI

[SuppressMessage("ReSharper", "NonReadonlyMemberInGetHashCode")]
        public override int GetHashCode()
        {
            var hashCode = 0;
            unchecked
            {
                if (_name != null)
                    hashCode += 1000000007 * _name.GetHashCode();
                hashCode += 1000000009 * _fontWeight.GetHashCode();
                hashCode += 1000000021 * _fontStyle.GetHashCode();
                if (_foreground != null)
                    hashCode += 1000000033 * _foreground.GetHashCode();
                if (_background != null)
                    hashCode += 1000000087 * _background.GetHashCode();
                if (_fontFamily != null)
                    hashCode += 1000000123 * _fontFamily.GetHashCode();
                if (_fontSize != null)
                    hashCode += 1000000167 * _fontSize.GetHashCode();
            }
            return hashCode;
        }

19 Source : TextViewPosition.cs
with MIT License
from AvaloniaUI

[SuppressMessage("ReSharper", "NonReadonlyMemberInGetHashCode")]
        public override int GetHashCode()
        {
            var hashCode = IsAtEndOfLine ? 115817 : 0;
            unchecked
            {
                hashCode += 1000000007 * Line.GetHashCode();
                hashCode += 1000000009 * Column.GetHashCode();
                hashCode += 1000000021 * VisualColumn.GetHashCode();
            }
            return hashCode;
        }

19 Source : MockRequestPayload.cs
with MIT License
from Avanade

public override int GetHashCode()
        {
            return Message.GetHashCode();
        }

19 Source : GpuBufferAllocator.cs
with GNU Lesser General Public License v2.1
from axiom3d

[OgreVersion(1, 7, 2)]
        protected int HashIndexBuffer(ushort batchSize, ushort vdatasize, int vertexIncrement, ushort xoffset, ushort yoffset,
                                       ushort numSkirtRowsCols, ushort skirtRowColSkip)
        {
            int ret = batchSize.GetHashCode();
            ret ^= vdatasize.GetHashCode();
            ret ^= vertexIncrement.GetHashCode();
            ret ^= xoffset.GetHashCode();
            ret ^= yoffset.GetHashCode();
            ret ^= numSkirtRowsCols.GetHashCode();
            ret ^= skirtRowColSkip.GetHashCode();
            return ret;
        }

19 Source : ErrorCodes.cs
with MIT License
from ay2015

public override int GetHashCode()
        {
            return _value.GetHashCode();
        }

19 Source : IndexingPrimitives.cs
with MIT License
from azist

public override int GetHashCode() => Value.GetHashCode() ^ Bookmark.GetHashCode();

19 Source : KeyStructs.cs
with MIT License
from azist

public override int GetHashCode()
    {
      return GDID.GetHashCode() ^ Int.GetHashCode();
    }

19 Source : Slim2Tests.cs
with MIT License
from azist

public int GetHashCode(int obj)
      {
        return (obj % 10).GetHashCode();
      }

19 Source : pb_VersionInfo.cs
with MIT License
from azsumas

public override int GetHashCode()
		{
			int hash = 13;

			unchecked
			{
				if(valid)
				{
					hash = (hash * 7) + major.GetHashCode();
					hash = (hash * 7) + minor.GetHashCode();
					hash = (hash * 7) + patch.GetHashCode();
					hash = (hash * 7) + build.GetHashCode();
					hash = (hash * 7) + type.GetHashCode();
				}
				else
				{
					return text.GetHashCode();
				}
			}

			return hash;
		}

19 Source : Argument.cs
with MIT License
from Bannerlord-Coop-Team

public override int GetHashCode()
        {
            var hash = (int) EventType;
            int? argHash = null;
            switch (EventType)
            {
                case EventArgType.Null:
                    break;
                case EventArgType.MBObjectManager:
                    break;
                case EventArgType.MBObject:
                    argHash = MbGUID.Value.GetHashCode();
                    break;
                case EventArgType.Int:
                    argHash = Int.Value.GetHashCode();
                    break;
                case EventArgType.Float:
                    argHash = Float.Value.GetHashCode();
                    break;
                case EventArgType.StoreObjectId:
                    argHash = StoreObjectId.Value.GetHashCode();
                    break;
                case EventArgType.CurrentCampaign:
                    break;
                case EventArgType.SmallObjectRaw:
                    argHash = Raw.GetHashCode();
                    break;
                default:
                    throw new ArgumentOutOfRangeException();
            }

            if (argHash.HasValue) hash = (hash * 397) ^ argHash.Value;

            return hash;
        }

19 Source : BatchSettings.cs
with MIT License
from BEagle1984

[SuppressMessage(
            "ReSharper",
            "NonReadonlyMemberInGetHashCode",
            Justification = Justifications.Settings)]
        public override int GetHashCode() => Size.GetHashCode();

19 Source : SourcePosDelta.cs
with MIT License
from benjamin-hodgson

public override int GetHashCode()
        {
            unchecked
            {
                int hash = 17;
                hash = hash * 23 + Lines.GetHashCode();
                hash = hash * 23 + Cols.GetHashCode();
                return hash;
            }
        }

19 Source : SourcePos.cs
with MIT License
from benjamin-hodgson

public override int GetHashCode()
        {
            unchecked
            {
                int hash = 17;
                hash = hash * 23 + Line.GetHashCode();
                hash = hash * 23 + Col.GetHashCode();
                return hash;
            }
        }

19 Source : HServerQuery.cs
with MIT License
from benotter

public override int GetHashCode() {
			return m_HServerQuery.GetHashCode();
		}

19 Source : HSteamPipe.cs
with MIT License
from benotter

public override int GetHashCode() {
			return m_HSteamPipe.GetHashCode();
		}

19 Source : HSteamUser.cs
with MIT License
from benotter

public override int GetHashCode() {
			return m_HSteamUser.GetHashCode();
		}

See More Examples