Foley .NET Utilities Class Library

HashSet.Add Method (ICollection)

Adds the elements of an ICollection into the HashSet.

[Visual Basic]
Overrides Overloads Public Function Add( _
   ByVal collection As ICollection _
) As Boolean Implements _
   ISet.Add
[C#]
public override bool Add(
   ICollection collection
);

Parameters

collection
The ICollection whose elements should be added into the HashSet.

Return Value

true if the HashSet is modified; otherwise false.

Implements

ISet.Add

Exceptions

Exception TypeCondition
System.ArgumentNullException The collection is a null reference (Nothing in Visual Basic).

See Also

HashSet Class | HashSet Members | Foley.Utilities.Collections Namespace | HashSet.Add Overload List