Working with the Queue Type
Queues are containers that ensure items are accessed using a first-in, first-out manner. Sadly, we
humans are subject to queues all day long: lines at the bank, lines at the movie theater, and lines at
the morning coffeehouse. When you are modeling a scenario in which items are handled on a first-
come, first-served basis, System.Collections.Queue fits the bill. In addition to the functionality
provided by the supported interfaces, Queue defines the key members shown in Table 10-3.
Table 10-3.
Members of the Queue Type
Do'stlaringiz bilan baham: |