Method Update
Update(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. If the collection has bag semantics, it depends on the value of DuplicatesByCounting if this updates all equivalent copies in the collection or just one.
Declaration
bool Update(T item)
Parameters
Type | Name | Description |
---|---|---|
T | item | Value to update. |
Returns
Type | Description |
---|---|
System.Boolean | True if the item was found and hence updated. |
Update(T, out 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. If the collection has bag semantics, it depends on the value of DuplicatesByCounting if this updates all equivalent copies in the collection or just one.
Declaration
bool Update(T item, out T olditem)
Parameters
Type | Name | Description |
---|---|---|
T | item | Value to update. |
T | olditem | On output the olditem, if found. |
Returns
Type | Description |
---|---|
System.Boolean | True if the item was found and hence updated. |