Click or drag to resize
CollectionBaseTAdd Method
Must be overridden to allow adding items to this collection.

Namespace: X3Platform.Collections
Assembly: X3Platform.Support (in X3Platform.Support.dll) Version: 1.0.0.0 (2.0.0.0)
Syntax
Exceptions
ExceptionCondition
NotImplementedExceptionAlways throws this exception to indicated that the method must be overridden or re-implemented in the derived class.
Remarks

This method is not abstract, although derived classes should always override it. It is not abstract because some derived classes may wish to reimplement Add with a different return type (typically bool). In C#, this can be accomplished with code like the following:

public class MyCollection<T>: CollectionBase<T>, ICollection<T>
{
    public new bool Add(T item) {
        /* Add the item */
    }

    void ICollection<T>.Add(T item) {
        Add(item);
    }
}
See Also