Core/CafeLib.Core.Collections/Heaps/BinaryHeap.cs
/// <summary>
/// Returns the top-level value in the heap or throws and exception if the heap is empty.
/// </summary>
/// <returns></returns>
Returns the top-level value in the heap or throws and exception if the heap is empty.
Returns the top - level value in the heap or throws and exception if the heap is empty .
public T Peek()
        {
            lock (HeapLock.Mutex)
            {
                if (Count > 0)
                {
                    return _list[1];
                }
            }
            throw new InvalidOperationException(nameof(Count));
        }
public T Peek ( ) { lock ( HeapLock . Mutex ) { if ( Count > 0 ) { return _list [ 1 ] ; } } throw new InvalidOperationException ( nameof ( Count ) ) ; }
Returns the top-level value in the heap or throws and exception if the heap is empty.
Returns the top - level value in the heap or throws and exception if the heap is empty .
None