コード例 #1
0
ファイル: Employee.cs プロジェクト: damonallison/dotnet
        public override bool Equals(object obj)
        {
            if (obj == null || GetType() != obj.GetType())
            {
                return(false);
            }
            if (ReferenceEquals(this, obj))
            {
                return(true);
            }
            if (this.GetHashCode() != obj.GetHashCode())
            {
                return(false);
            }

            Employee other = (Employee)obj;

            if (!base.Equals(other))
            {
                return(false);
            }
            if (ReferenceEquals(LanId, null))
            {
                return(ReferenceEquals(other.LanId, null));
            }
            return(LanId.Equals(other.LanId));
        }