示例#1
0
 public void CopyTo(int index, MarshalArray <T> array, int arrayIndex, int count)
 {
     if (this.m_size - index < count)
     {
         ThrowHelper.ThrowArgumentException(ExceptionResource.Argument_InvalidOffLen);
     }
     MarshalArrayBase.Copy(this.m_items, index, array, arrayIndex, count);
 }
示例#2
0
        public MarshalList(int capacity)
        {
            if (capacity < 0)
            {
                throw new ArgumentException("CapacityStep不能小于0!");
            }

            this.m_items = new MarshalArray <T>(capacity);
        }
示例#3
0
            public bool MoveNext()
            {
                MarshalArray <T> list = this.list;

                if ((uint)this.index >= (uint)list.Length)
                {
                    this.index   = this.list.Length + 1;
                    this.current = default(T);
                    return(false);
                }

                this.current = list[this.index];
                ++this.index;
                return(true);
            }
示例#4
0
 internal Enumerator(MarshalArray <T> list)
 {
     this.list    = list;
     this.index   = 0;
     this.current = default(T);
 }
示例#5
0
 public void CopyTo(MarshalArray <T> array, int arrayIndex)
 {
     MarshalArrayBase.Copy(this.m_items, 0, array, arrayIndex, this.m_size);
 }
示例#6
0
 public void CopyTo(MarshalArray <T> array)
 {
     this.CopyTo(array, 0);
 }
示例#7
0
 public MarshalList()
 {
     this.m_items = new MarshalArray <T>(4);
 }