string GetTextFromQueue(Salad salad) { string saladStr = "Salad: "; int i = 0; while (i < salad.GetSize()) { var veggie = salad.GetElementAt(i); saladStr += veggie.VegetableCode.ToString() + " "; i++; } return(saladStr); }