iTextSharp.text.BaseColor.Equals C# (CSharp) Метод

Equals() публичный Метод

public Equals ( object obj ) : bool
obj object
Результат bool
        public override bool Equals(object obj)
        {
            if (!(obj is BaseColor))
                return false;
            return color.Equals(((BaseColor)obj).color);
        }

Usage Example

Пример #1
0
        /// <summary>
        /// Compares this Font with another
        /// </summary>
        /// <param name="obj">the other Font</param>
        /// <returns>a value</returns>
        public virtual int CompareTo(object obj)
        {
            if (obj == null)
            {
                return(-1);
            }
            Font font;

            try
            {
                font = (Font)obj;
                if (_baseFont != null && !_baseFont.Equals(font.BaseFont))
                {
                    return(-2);
                }
                if (_family != font.Family)
                {
                    return(1);
                }
                if (_size.ApproxNotEqual(font.Size))
                {
                    return(2);
                }
                if (_style != font.Style)
                {
                    return(3);
                }
                if (_color == null)
                {
                    if (font.Color == null)
                    {
                        return(0);
                    }
                    return(4);
                }
                if (font.Color == null)
                {
                    return(4);
                }
                if (_color.Equals(font.Color))
                {
                    return(0);
                }
                return(4);
            }
            catch
            {
                return(-3);
            }
        }
All Usage Examples Of iTextSharp.text.BaseColor::Equals