Beispiel #1
0
        internal virtual void Add(FixupHolder fixup)
        {
            if (this.m_count == this.m_values.Length)
            {
                this.EnlargeArray();
            }
            FixupHolder[] fixupHolderArray = this.m_values;
            int           num = this.m_count;

            this.m_count = num + 1;
            int         index       = num;
            FixupHolder fixupHolder = fixup;

            fixupHolderArray[index] = fixupHolder;
        }
Beispiel #2
0
        private void EnlargeArray()
        {
            int length = this.m_values.Length * 2;

            if (length < 0)
            {
                if (length == int.MaxValue)
                {
                    throw new SerializationException(Environment.GetResourceString("Serialization_TooManyElements"));
                }
                length = int.MaxValue;
            }
            FixupHolder[] fixupHolderArray = new FixupHolder[length];
            Array.Copy((Array)this.m_values, (Array)fixupHolderArray, this.m_count);
            this.m_values = fixupHolderArray;
        }