Assuming you mean Queue<T>
you could just use:
if (queue.Count != 0)
But why bother? Just iterate over it anyway, and if it's empty you'll never get into the body:
Queue<string> queue = new Queue<string>();
// It's fine to use foreach...
foreach (string x in queue)
{
// We just won't get in here...
}
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…