OpenMetaverse.Permissions.GetHashCode C# (CSharp) Method

GetHashCode() public method

public GetHashCode ( ) : int
return int
        public override int GetHashCode()
        {
            return BaseMask.GetHashCode() ^ EveryoneMask.GetHashCode() ^ GroupMask.GetHashCode() ^
                NextOwnerMask.GetHashCode() ^ OwnerMask.GetHashCode();
        }

Usage Example

 /// <summary>
 /// Generates a number corresponding to the value of the object to support the use of a hash table.
 /// Suitable for use in hashing algorithms and data structures such as a hash table
 /// </summary>
 /// <returns>A Hashcode of all the combined InventoryItem fields</returns>
 public override int GetHashCode()
 {
     return(AssetUUID.GetHashCode() ^ Permissions.GetHashCode() ^ AssetType.GetHashCode() ^
            InventoryType.GetHashCode() ^ Description.GetHashCode() ^ GroupID.GetHashCode() ^
            GroupOwned.GetHashCode() ^ SalePrice.GetHashCode() ^ SaleType.GetHashCode() ^
            Flags.GetHashCode() ^ CreationDate.GetHashCode() ^ LastOwnerID.GetHashCode());
 }