When to use the Stack collection in C#?

后端 未结 12 2261
滥情空心
滥情空心 2021-02-14 20:44

I do understand how Stack() and Stack works, but I really can\'t see any scenarios where an array, List or IEnumer

12条回答
  •  生来不讨喜
    2021-02-14 21:04

    Keeping track of Browser History is a use for the stack. Also, "undo" for edits, etc. Similarly, some warehouse control systems use stacks and queues for managing the order in which items need to be selected for shipments.

提交回复
热议问题