Method AddAny
AddAny<T>(ISet<T>, IEnumerable<T>)
Attempts to add multiple items to the specified set and returns whether any item was successfully added.
Declaration
public static bool AddAny<T>(this ISet<T> set, IEnumerable<T> items)
Parameters
Type | Name | Description |
---|---|---|
ISet<T> | set | The set to which items will be added. |
IEnumerable<T> | items | The collection of items to add to the set. |
Returns
Type | Description |
---|---|
bool |
|
Type Parameters
Name | Description |
---|---|
T | The type of elements contained in the set. |
Exceptions
Type | Condition |
---|---|
ArgumentNullException | Thrown if either |