49

Is there a standard collection in .NET that implements a FIFO stack?

0

3 Answers 3

77

FIFO means first-in-first-out. The data structure you're looking for is called a Queue.

Sign up to request clarification or add additional context in comments.

1 Comment

yes, or asker meant named pipes: en.wikipedia.org/wiki/Named_pipe - named pipe (also known as a FIFO for its behavior)
24

Are you looking for the Queue<T> class?

1 Comment

The accepted answer is outdated in favor of generic queue.
23

FIFO means first in first out. This is as opposed to LIFO (or FILO as lucero pointed out). which is last in first out.

A link comparing queues, stacks, and hashtables.

You want to use a queue object for FIFO operations:

http://www.csharpfriends.com/Articles/getArticle.aspx?articleID=66

MSDN link on queues

And a stack is used for LIFO operations: Stack Link

1 Comment

Note that LIFO is also known as FILO. :-)

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.