# Queue< T >

Generic Collection classes includes Queue< T >, where < T > specifies the dataType of items that will be contained in the queue.

[MSDN Reference](https://msdn.microsoft.com/en-us/library/7977ey2c.aspx)

> Objects stored in a Queue are inserted at one end and removed from the other. Queues and stacks are useful when you need temporary storage for information; that is, when you might want to discard an element after retrieving its value. Use Queue if you need to access the information in the same order that it is stored in the collection. Use Stack if you need to access the information in reverse order

A queue operates in a first-in, first-out (FIFO) manner. A queue is a specialized data structure that supports adding and removing items using this FIFO access methodology.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://kdoore.gitbook.io/cs2335/c-language/c_language/queue-t.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
