There are two Queue classes in the .NET Framework, the difference is they were released at different times - one is newer. Use the strongly typed Queue(Of T) shown in the second list item below to achieve Intellisense and to have a strongly typed instance you can program against easily...
Code sample
Dim numbers As New Queue(Of String)
The two Queue classes:
System.Collections.Queue
- Intellisense shows an Object (Likely this is your problem).
- from .NET 1.0
- results in weakly typed Object elements
System.Collections.Generic.Queue(Of T)
- Intellisense will show the strongly type T members (Use this instead)
- from .NET 2.0
- results in strongly typed (Of T) elements where you specify T
Use the links to visit the documentation, put the doc page in VB syntax mode, and scroll down to the Examples section to see its usage.
Other
If you're using a Queue different from the ones mentioned above, you can always Convert/cast the dequeued objects back into their strongly-typed values using mechanisms like the following: