In C#, how can I check if a Queue is empty?
I want to iterate through the Queue's elements, and I need to know when to stop. How can I accomplish this?
Assuming you meant System.Collections.Generic.Queue<T>
System.Collections.Generic.Queue<T>
if(yourQueue.Count != 0) { /* Whatever */ }
should do the trick.