Method UpdateOrAdd
UpdateOrAdd(T)
Check if this collection contains an item equivalent according to the itemequalityComparer to a particular value. If so, update the item in the collection with a binary copy of the supplied value; else add the value to the collection.
NOTE: the bag implementation is currently wrong! ?????
Declaration
public bool UpdateOrAdd(T item)
Parameters
Type | Name | Description |
---|---|---|
T | item | Value to add or update. |
Returns
Type | Description |
---|---|
System.Boolean | True if the item was found and updated (hence not added). |
Implements
UpdateOrAdd(T, out T)
Declaration
public bool UpdateOrAdd(T item, out T olditem)
Parameters
Type | Name | Description |
---|---|---|
T | item | |
T | olditem |
Returns
Type | Description |
---|---|
System.Boolean |