예제 #1
0
        /// <summary>
        /// Determines whether the specified Object is equal to the current Object.
        /// </summary>
        /// <param name="obj"></param>
        /// <returns></returns>
        public override bool Equals(object obj)
        {
            if (obj == null)
            {
                return(false);
            }
            if (Object.ReferenceEquals(this, obj))
            {
                return(true);
            }
            if (this.GetType() != obj.GetType())
            {
                return(false);
            }


            var other = (VLLanguage)obj;

            //reference types
            if (!Object.Equals(EnglishName, other.EnglishName))
            {
                return(false);
            }
            if (!Object.Equals(Name, other.Name))
            {
                return(false);
            }
            if (!Object.Equals(TwoLetterISOCode, other.TwoLetterISOCode))
            {
                return(false);
            }
            if (!Object.Equals(ThreeLetterISOCode, other.ThreeLetterISOCode))
            {
                return(false);
            }
            //value types
            if (!LanguageId.Equals(other.LanguageId))
            {
                return(false);
            }
            if (!LCID.Equals(other.LCID))
            {
                return(false);
            }

            return(true);
        }