Beispiel #1
0
        object IList.this[int index]
        {
            get
            {
                //checkAndGrow(index);
                int diff = index + 1 - _size;
                for (int i = 0; i < diff; ++i)
                {
                    Add(new T());
                }

                return(this[index]);
            }
            set
            {
                //checkAndGrow(index);
                int diff = index + 1 - _size;
                for (int i = 0; i < diff; ++i)
                {
                    Add(new T());
                }

                ObjectArray <T> .VerifyValueType(value);

                this[index] = (T)value;
            }
        }
Beispiel #2
0
        int IList.Add(object item)
        {
            ObjectArray <T> .VerifyValueType(item);

            this.Add((T)item);
            return(this.Count - 1);
        }
Beispiel #3
0
        void IList.Insert(int index, object item)
        {
            ObjectArray <T> .VerifyValueType(item);

            this.Insert(index, (T)item);
        }