[This is preliminary documentation and is subject to change.]
Adds a T resource to the set.
Declaration Syntax
C# |
public int Add( T resource )
Parameters
- resource (T)
- The resource to add. May not be null.
Return Value
The slot allocated to the new resource.
Remarks
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.
Exceptions
Exception | Condition |
---|---|
ArgumentNullException | Thrown if the supplied resource is
null. |