/// <summary>
        /// Determines whether two specified <see cref="MetadataTag"/> objects have the same value.
        /// </summary>
        /// <param name="left">A <see cref="MetadataTag"/> or a null reference (<b>Nothing</b> in Visual Basic).</param>
        /// <param name="right">A <see cref="MetadataTag"/> or a null reference (<b>Nothing</b> in Visual Basic).</param>
        /// <returns>
        /// <b>true</b> if the value of left is the same as the value of right; otherwise, <b>false</b>.
        /// </returns>
        public static bool operator ==(MetadataTag left, MetadataTag right)
        {
            // Check whether both are null
            if ((object)left == (object)right)
            {
                return(true);
            }
            else if ((object)left == null || (object)right == null)
            {
                return(false);
            }
            left.CheckDisposed();
            right.CheckDisposed();
            // Check all properties
            if ((left.Key != right.Key) ||
                (left.ID != right.ID) ||
                (left.Description != right.Description) ||
                (left.Count != right.Count) ||
                (left.Length != right.Length) ||
                (left.Model != right.Model) ||
                (left.Type != right.Type))
            {
                return(false);
            }
            if (left.Length == 0)
            {
                return(true);
            }
            IntPtr ptr1 = FreeImage.GetTagValue(left.tag);
            IntPtr ptr2 = FreeImage.GetTagValue(right.tag);

            return(FreeImage.CompareMemory(ptr1, ptr2, left.Length));
        }