internal Enumerator(MarshalList <T> list) { this.list = list; this.index = 0; this.version = list.m_version; this.current = default(T); }
public bool MoveNext() { MarshalList <T> list = this.list; if (this.version != list.m_version || (uint)this.index >= (uint)list.m_size) { return(this.MoveNextRare()); } this.current = list.m_items[this.index]; ++this.index; return(true); }
public MarshalList <T> GetRange(int index, int count) { if (index < 0 || count < 0) { ThrowHelper.ThrowArgumentOutOfRangeException( index < 0 ? ExceptionArgument.index : ExceptionArgument.count, ExceptionResource.ArgumentOutOfRange_NeedNonNegNum); } if (this.m_size - index < count) { ThrowHelper.ThrowArgumentException(ExceptionResource.Argument_InvalidOffLen); } MarshalList <T> objList = new MarshalList <T>(count); MarshalArrayBase.Copy(this.m_items, index, objList.m_items, 0, count); objList.m_size = count; return(objList); }