Is there a standard collection in .NET that implements a FIFO stack?
            Asked
            
        
        
            Active
            
        
            Viewed 9.5k times
        
    3 Answers
75
            FIFO means first-in-first-out. The data structure you're looking for is called a Queue.
 
    
    
        Bill the Lizard
        
- 398,270
- 210
- 566
- 880
 
    
    
        Dave Markle
        
- 95,573
- 20
- 147
- 170
- 
                    5yes, or asker meant named pipes: http://en.wikipedia.org/wiki/Named_pipe - named pipe (also known as a FIFO for its behavior) – Andrey Jun 03 '10 at 13:22
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
 
    
    
        kemiller2002
        
- 113,795
- 27
- 197
- 251
21
            
            
        Are you looking for the Queue<T> class?
 
    
    
        NoDataDumpNoContribution
        
- 10,591
- 9
- 64
- 104
 
    
    
        LukeH
        
- 263,068
- 57
- 365
- 409
 
    