beginners queue question

  • Thread starter Thread starter nickcleary1
  • Start date Start date
N

nickcleary1

I need help displaying the contents of my queue in a listbox(possibly
richtextbox if easier?) I know its quite a simple request!

any help would be much appriciated

thanks

nic
 
Queue<string> q = new Queue<string>();
q.Enqueue("One");
q.Enqueue("Two");
q.Enqueue("Three");

listBox.Items.Clear();

foreach (string s in q)
{
listBox.Items.Add(s);
}


HTH
 
Back
Top