Method TryInsertBefore
TryInsertBefore(T, T, IEqualityComparer<T>?)
Inserts an item before another item.
Declaration
public bool TryInsertBefore(T findItem, T item, IEqualityComparer<T>? comparer = null)
Parameters
Type | Name | Description |
---|---|---|
T | findItem | The item to find to determine the insertion point. |
T | item | The item to insert. |
IEqualityComparer<T> | comparer | The comparer to use to determine item equality. |
Returns
Type | Description |
---|---|
bool | true if the item to insert after was found and the item was inserted, otherwise false. |