Ejemplo n.º 1
0
        public bool Equals(UserActionList list)
        {
            if (list == null)
            {
                return(false);
            }

            if (this.Count != list.Count)
            {
                return(false);
            }
            else
            {
                bool same = true;
                for (int i = 0; i < this.Count; i++)
                {
                    if (this[i].Id != list[i].Id)
                    {
                        same = false;
                        break;
                    }
                }
                return(same);
            }
        }
Ejemplo n.º 2
0
        public override bool Equals(object obj)
        {
            if (obj == null) // check if its null
            {
                return(false);
            }

            if (this.GetType() != obj.GetType()) // check if the type is the same
            {
                return(false);
            }

            UserActionList list = (UserActionList)obj;

            if (list == null) // check if it can be casted
            {
                return(false);
            }

            if (this.Count != list.Count)
            {
                return(false);
            }
            else
            {
                bool same = true;
                for (int i = 0; i < this.Count; i++)
                {
                    if (this[i].Id != list[i].Id)
                    {
                        same = false;
                        break;
                    }
                }
                return(same);
            }
        }