public virtual object Clone() { TestObjectList collection = new TestObjectList(this._count); Array.Copy(this._array, 0, collection._array, 0, this._count); collection._count = this._count; collection._version = this._version; return(collection); }
public TestObjectList(TestObjectList collection) { if (collection == null) { throw new ArgumentNullException("collection"); } this._array = new TestObject[collection.Count]; AddRange(collection); }
public virtual void AddRange(TestObjectList collection) { if (collection == null) { throw new ArgumentNullException("collection"); } if (collection.Count == 0) { return; } if (this._count + collection.Count > this._array.Length) { EnsureCapacity(this._count + collection.Count); } ++this._version; Array.Copy(collection.InnerArray, 0, this._array, this._count, collection.Count); this._count += collection.Count; }
internal Enumerator(TestObjectList collection) { this._collection = collection; this._version = collection._version; this._index = -1; }