[This is preliminary documentation and is subject to change.]
Adds a T resource to the set.
| C# |
public int Add( T resource )
- resource (T)
- The resource to add. May not be null.
The slot allocated to the new resource.
If there are no free slots in the set, the capacity is
automatically increased and a slot allocated from the new capacity. This
is a fast operation taking constant time except when the capacity of the
set has to be increased.
| Exception | Condition |
|---|---|
| ArgumentNullException | Thrown if the supplied resource is
null. |