473,385 Members | 1,569 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

beginners queue question

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

Dec 6 '06 #1
1 1457

Queue<stringq = 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

<ni*********@hotmail.comwrote in message
news:11**********************@16g2000cwy.googlegro ups.com...
>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
Dec 6 '06 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

16
by: newsock | last post by:
What differences between queue, deque and priority_queue? And under what situations choose one of them to use? Thanks for your help!
4
by: ~Gee | last post by:
Hi, When I try to compile the following program, I get the following error: $ g++ anotherTest.C anotherTest.C: In function `int main()': anotherTest.C:47: void value not ignored as it ought to...
4
by: spinner | last post by:
--------------------------------------------- A two parter newbie question I am afraid. Am I right in thinking that using something like ... item = a_queue.get() print item will not...
7
by: unified | last post by:
Ok, I'm working on a program that is supposed to compare each letter of a string that is put into a stack and a queue. It is supposed to tell whether or not a word is a palindrome or not. (a...
3
by: kelkel | last post by:
Hi all, I got a question here which about using queue. i have create a class of queue. Public Sub Add(ByVal data As Object) SyncLock Me _Data.Enqueue(data) Monitor.Pulse(Me) End SyncLock End...
19
by: ern | last post by:
I need a FIFO queue of size 20, to keep track of a running average. Once the queue is full with 20 values, I want to take the sum/20 = AVERAGE. Then when a new value comes in, I want: (Old Sum...
3
by: Aahz | last post by:
If you were going to name three or five essential recipes from the Python Cookbook suitable for beginners, what would you pick? Yes, this is for _Python for Dummies_, so idioms that aren't in the...
7
by: Michael D. Ober | last post by:
When calling Enqueue, the internal array may need to be reallocated. My question is by how much? In the old MFC array classes, you could tell MFC how many additional elements to add to the array...
11
by: Terry | last post by:
Hello! I'm trying to implement a message queue among threads using Queue. The message queue has two operations: PutMsg(id, msg) # this is simple, just combine the id and msg as one and put it...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.