Example #1
0
        /// <summary>
        /// 添加数据集合
        /// </summary>
        /// <param name="list">单向动态数组</param>
        /// <param name="values">数据集合</param>
        /// <returns>单向动态数组</returns>
        public unsafe static list </*Type[0]*/ ulong /*Type[0]*/> add
            (this list </*Type[0]*/ ulong /*Type[0]*/> list, System.Collections.Generic.ICollection </*Type[0]*/ ulong /*Type[0]*/> values)
        {
            if (list != null)
            {
                int count = values.count();
                if (count != 0)
                {
                    int index = list.Count;
                    list.AddLength(count);
                    fixed(/*Type[0]*/ ulong /*Type[0]*/ *valueFixed = list.Unsafer.Array)
                    {
                        /*Type[0]*/
                        ulong /*Type[0]*/ *write = valueFixed + index;

                        foreach (/*Type[0]*/ ulong /*Type[0]*/ nextValue in values)
                        {
                            *write++ = nextValue;
                        }
                    }
                }
                return(list);
            }
            return(values.getList());
        }