Esempio n. 1
0
        public object Clone()
        {
            PeopleList clone = new PeopleList();

            foreach (string value in this)
            {
                clone.Add(value);
            }

            return(clone);
        }
Esempio n. 2
0
        public override bool Equals(object unknownObject)
        {
            if (unknownObject is PeopleList)
            {
                PeopleList compareList = unknownObject as PeopleList;

                if (compareList.Count == this.Count)
                {
                    foreach (string text in compareList)
                    {
                        if (!this.Contains(text))
                        {
                            return(false);
                        }
                    }

                    return(true);
                }
            }

            return(false);
        }