VB collection to ? in C#

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

One of my team memebers wants to pass a VB Collection to use as a pick list
for a drop down box on an aspx page. I have to use C# for the code behind for
the aspx page. I can not find a collection object or any way to convert the
collection to something that C# will use. I would like to hear any ideas on a
solution for that.

One idea I had was to use a Hashtable. Does anyone know the code for that
conversion?
 
owyn,

You could always import the definition of Collection and use that.
However, if this is VB.NET code, I would recommend that you have the
developer return a Hashtable.

If you must take a Collection, then you can always add a refernece to
Microsoft.VisualBasic.dll, and then use the Collection type from that. If
this is a VB6 collection, then you can use COM interop, and look for
MSVBVM60.dll and use the definition of collection from that.

Hope this helps.
 
Back
Top