VB Collection

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?
 
N

Nick Malik

VB, as in VB6 or VB.NET? If the latter, then your team member is already
passing a .net type. Just have him use a specific .NET collection type.

If VB6, you should be able to pass the VB collection and, in your C# app,
declare the VB collection component by referencing the VB runtime as a COM
interface, allowing Visual Studio to create a RCW for you.

(I have not tried this).

Interesting question.

Here are some articles that may prove useful if you are mixing VB6 and C#:
http://www.vbrad.com/pf.asp?p=source/src_real_interop.htm
http://www.ftponline.com/vsm/2002_04/magazine/features/rlhotka/default.aspx

HTH,
--- Nick
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top