Collections

  • Thread starter Thread starter Cheryl
  • Start date Start date
C

Cheryl

Does a VB.NET collection class exist that is:

1. Two-dimensional
2. FIFO (first in, first out)

Thank you!

- Cheryl
 
Cheryl said:
Does a VB.NET collection class exist that is:

1. Two-dimensional
2. FIFO (first in, first out)

I suggest to check out the classes and namespaces in the
'System.Collections' namespace.
 
1. Collections are not two dimensional. You have to explain in what
respect you need it to have two dimensions to be able to help you.

2. System.Collections.Queue.
 
A key and and a value - both strings

- Cheryl

Göran Andersson said:
1. Collections are not two dimensional. You have to explain in what
respect you need it to have two dimensions to be able to help you.

2. System.Collections.Queue.
 
Cheryl,

Can not be a problem it holds object, therefore you can make your own class.

Although a it is not a dictionary, simple because of the fact that a
dictionary is not FIFO

I hope this helps,

Cor
 
You mean that you want a queue where each item has a key and a value?
Not really two dimensional, but rather a double one dimensional list?

If you use framework 2.0 you can use generics to make typed lists. I
believe that you could make a queue that holds KeyValuePair-elements:

Queue<KeyValuePair<string,string>>
 
Not sure what you want exactly but maybe this simplistic example will work:

Private Structure myStructure
Dim Key as string
Dim Value as string
End Structure

Use that structure to hold your key-value pairs and then a Que or Stack to
hold myStructures. Should be easy to "roll" your own FIFO using this concept.
 
Cheryl,
How about a one-dimensional array in a Queue?

--
Hope this helps
Jay B. Harlow [MVP - Outlook]
..NET Application Architect, Enthusiast, & Evangelist
T.S. Bradley - http://www.tsbradley.net


|I think the Queue class is only one-dimentional
|
| - Cheryl
|
| | > > I've been trying this, but I haven't found what I need.
| >
| > What about the 'Queue' class?
| >
| > --
| > M S Herfried K. Wagner
| > M V P <URL:http://dotnet.mvps.org/>
| > V B <URL:http://classicvb.org/petition/>
|
|
 
Back
Top