Read Item in Queue<T> before Dequeueing
I have a Queue<T>
In my T
I have a DateLoaded property.
I want to say if开发者_JAVA百科 the DateLoaded is older than 5 minutes dequeue it and execute code on T
Is this possible?
Use the Peek()
method.
You can call Peek
to look at what the first element in the queue is.
精彩评论