public T Poll() { if (!IsEmpty()) { Swap(0, tailIndex); var returnValue = array[tailIndex]; array.RemoveAt(tailIndex); tailIndex--; SwimDown(0); return(returnValue); } return(default(T)); }
/// <summary> /// Removes the item at the specified index. /// </summary> /// <param name="index">The index.</param> public void RemoveAt(int index) { _array.RemoveAt(index); }