开发者

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.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜