Monday, 15 August 2011

c# - How can I pass a collection of objects from VB6 to .NET? -


I have to pass a collection of key / value pairs of .NET from VB6. In VB6 code they exist in a basic collection. But I'm not sure how I can accept the parameters of a method in my own way in the collection in my .NET project.

I tried to add a reference to the Visual Basic for Applications but came back

The text "itemprop =" text ">

You type something like this in C #:

  [Guid (" fb5e929a-2f8b-481e-9516-97edf5099df4 " ) [ComVisible (true)] public interface myInterface {public zero addObject (string key, string value);}   

and in your class, you can do it Private collection public addObject (string key, string value) {collection.Add (key, value);}

This will allow you to addObject Give permission to call and pass on your data Then .net will add it to a collection, so instead of passing your entire collection from vb6 to .net, you can pass them one by one.

You

More information about .com is an example of a code between

No comments:

Post a Comment