Method TryGet
- Namespace
- DisCatSharp
- Assembly
- DisCatSharp.dll
TryGet(Func<T, bool>, out T)
Gets first item from the buffer that matches the predicate.
public bool TryGet(Func<T, bool> predicate, out T item)
Parameters
predicateFunc<T, bool>Predicate used to find the item.
itemTItem that matches the predicate, or default value for the type of the items in this ring buffer, if one is not found.
Returns
- bool
Whether an item that matches the predicate was found or not.