June 2003
Intermediate to advanced
800 pages
34h 20m
English
You need a collection where items will be retrieved in the same order they are added.
Use the System.Collections.Queue type, which provides a first-in, first-out collection.
Queues are used for a variety of sequential programming tasks. For example, you might use a queue to store a list of tasks that needs to be performed with a server-side component. Because the queue is a first-in, first-out collection, the oldest items are always dealt with first.
Conceptually, the Queue is a dynamically sized array that stores objects, much as the ArrayList does. The Queue starts with an initial capacity of 32 items (unless you supply a different capacity in the constructor) and doubles the capacity as needed. ...
Read now
Unlock full access