public T Dequeue() { lock (innerList) { T value = default(T); if (!IsEmpty()) { value = innerList.getByIndex(0); innerList.removeByIndex(0); DecreaseSize(); } return(value); } }
public T Peek() { T value = default(T); lock (innerList) { if (!IsEmpty()) { value = innerList.getByIndex(0); } } return(value); }