// FDG ***** DO override GetHashCode whenever you override Equals.

        /// <summary>
        /// Gets the hash code for this instance of an OpenXmlAttribute structure.
        /// </summary>
        /// <returns>The hash code for this instance of an OpenXmlAttribute structure.</returns>
        public override int GetHashCode()
        {
            int hashCode = 0;

            if (LocalName != null)
            {
                hashCode ^= LocalName.GetHashCode();
            }

            if (NamespaceUri != null)
            {
                hashCode ^= NamespaceUri.GetHashCode();
            }

            if (Prefix != null)
            {
                hashCode ^= Prefix.GetHashCode();
            }

            if (Value != null)
            {
                hashCode ^= Value.GetHashCode();
            }

            return(hashCode);
        }
Example #2
0
 public override int GetHashCode()
 {
     unchecked
     {
         return(((NamespaceUri?.GetHashCode() ?? 0) * 397) ^ (Version != null ? Version.GetHashCode() : 0));
     }
 }
Example #3
0
 public override int GetHashCode()
 {
     return((NamespaceUri?.GetHashCode() ?? 0)
            + (LocalName?.GetHashCode() ?? 0));
 }
Example #4
0
		public override int GetHashCode ()
		{
			return (NamespaceUri?.GetHashCode () ?? 0)
				+ (TypeName?.GetHashCode () ?? 0);
		}
Example #5
0
 public override int GetHashCode()
 {
     unchecked {
         return(9 * NamespaceUri.GetHashCode());
     }
 }
Example #6
0
 public override int GetHashCode()
 {
     return(NamespaceUri.GetHashCode() + Name.GetHashCode());
 }
Example #7
0
 public override int GetHashCode()
 {
     return(LocalName.GetHashCode() ^ NamespaceUri.GetHashCode() << 8);
 }