示例#1
0
文件: Deque`1.cs 项目: urish/M3D
        public void InsertRange(int index, IEnumerable <T> collection)
        {
            var collectionCount = collection.Count();

            Deque <T> .CheckNewIndexArgument(Count, index);

            if (collectionCount > Capacity - Count)
            {
                Capacity = checked (Count + collectionCount);
            }

            if (collectionCount == 0)
            {
                return;
            }

            DoInsertRange(index, collection, collectionCount);
        }
示例#2
0
文件: Deque`1.cs 项目: urish/M3D
        public void Insert(int index, T item)
        {
            Deque <T> .CheckNewIndexArgument(Count, index);

            DoInsert(index, item);
        }