Method TryPredecessor
TryPredecessor(T, out T)
Find the strict predecessor of item in the sorted collection, that is, the greatest item in the collection smaller than the item.
Declaration
bool TryPredecessor(T item, out T res)
Parameters
Type | Name | Description |
---|---|---|
T | item | The item to find the predecessor for. |
T | res | The predecessor, if any; otherwise the default value for T. |
Returns
Type | Description |
---|---|
System.Boolean | True if item has a predecessor; otherwise false. |