Ejemplo n.º 1
0
        int IList.Add(object value)
        {
            CollectionWrapper <T> .VerifyValueType(value);

            this.Add((T)value);
            return(this.Count - 1);
        }
Ejemplo n.º 2
0
        void IList.Insert(int index, object value)
        {
            if (this._genericCollection != null)
            {
                throw new InvalidOperationException("Wrapped ICollection<T> does not support Insert.");
            }
            CollectionWrapper <T> .VerifyValueType(value);

            this._list.Insert(index, (object)(T)value);
        }
Ejemplo n.º 3
0
        object IList.this[int index] {
            get {
                if (this._genericCollection != null)
                {
                    throw new InvalidOperationException("Wrapped ICollection<T> does not support indexer.");
                }
                return(this._list[index]);
            }
            set {
                if (this._genericCollection != null)
                {
                    throw new InvalidOperationException("Wrapped ICollection<T> does not support indexer.");
                }
                CollectionWrapper <T> .VerifyValueType(value);

                this._list[index] = (object)(T)value;
            }
        }