コード例 #1
0
        public virtual object Clone()
        {
            SaveableCollectionBase <T> desc = new SaveableCollectionBase <T> {
                ComponentAdapter = _componentAdapter
            };                                                                                                       // the same adapter reference

            return(desc);
        }
コード例 #2
0
        /// <summary>
        /// Equality operator
        /// </summary>
        /// <param name="other"></param>
        /// <returns></returns>
        public virtual bool Equals(SaveableCollectionBase <T> other)
        {
            if (_items.Length != other._items.Length)
            {
                return(false);
            }

            int len = _items.Length;

            for (int i = 0; i < len; i++)
            {
                if (!_items[i].Equals(other._items[i]))
                {
                    return(false);
                }
            }

            return(true);
        }