Пример #1
0
        public void Resize(int desiredSize)
        {
            var size = Array2Util.NextPowerOf2(desiredSize);

            if (size == items.Length)
            {
                return;
            }
            Array.Resize(ref items, size);
        }
Пример #2
0
 public Array2(int desiredSize)
 {
     items = new T[Array2Util.NextPowerOf2(desiredSize)];
 }