Method UpdateOrAdd
UpdateOrAdd(T)
Check if an item (collection equal to a supplied one) is in the set and if so replace the item object in the set with the supplied one; else add the supplied one.
Declaration
public virtual bool UpdateOrAdd(T item)
Parameters
Type | Name | Description |
---|---|---|
T | item | The item to look for and update or add |
Returns
Type | Description |
---|---|
System.Boolean | True if item was updated |
Implements
UpdateOrAdd(T, out T)
Check if an item (collection equal to a supplied one) is in the set and if so replace the item object in the set with the supplied one; else add the supplied one.
Declaration
public virtual bool UpdateOrAdd(T item, out T olditem)
Parameters
Type | Name | Description |
---|---|---|
T | item | The item to look for and update or add |
T | olditem |
Returns
Type | Description |
---|---|
System.Boolean | True if item was updated |