Open sandboxFocus

Method Add

Add(T)

Creates a new IncrementalHashSet<T> that represents the operation of adding an item to the collection, in addition to any operations represented by the current collection.

Declaration
public IncrementalHashSet<T> Add(T item)
Parameters
Type Name Description
T item

The item to add to the collection.

Returns
Type Description
IncrementalHashSet<T>

A new IncrementalHashSet<T> with the additional add operation.

Remarks

This method does not modify the current instance; it returns a new instance with the combined operations.

Add(T[])

Creates a new IncrementalHashSet<T> that represents the operation of adding items to the collection, in addition to any operations represented by the current collection.

Declaration
public IncrementalHashSet<T> Add(T[] items)
Parameters
Type Name Description
T[] items

The items to add to the collection.

Returns
Type Description
IncrementalHashSet<T>

A new IncrementalHashSet<T> with the additional add operations.

Remarks

This method does not modify the current instance; it returns a new instance with the combined operations.

Add(IEnumerable<T>)

Creates a new IncrementalHashSet<T> that represents the operation of adding items to the collection, in addition to any operations represented by the current collection.

Declaration
public IncrementalHashSet<T> Add(IEnumerable<T> items)
Parameters
Type Name Description
IEnumerable<T> items

The items to add to the collection.

Returns
Type Description
IncrementalHashSet<T>

A new IncrementalHashSet<T> with the additional add operations.

Remarks

This method does not modify the current instance; it returns a new instance with the combined operations.