我怎样才能在.NET操纵VB6的集合? [英] How can I manipulate a VB6 Collection in .NET?

查看:193
本文介绍了我怎样才能在.NET操纵VB6的集合?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我目前在设计将由COM对象消耗。NET软件界面的过程 - 具体而言,VB6

I am currently in the process of designing an interface for .NET software that would be consumed by COM objects - specifically, VB6.

虽然我已经找到了一些详细说明如何使一个COM互操作界面由微软的网页,我目前绊倒运用在设计时类别:我希望能够使用标准的VB6集合对象在.NET程序 - 这样,我就可以指定,在界面上,这样的集合作为参数,或作为返回类型,简化使用接口所需,为客​​户的工作

While I have found a number of pages by Microsoft detailing how to make an COM-interoperable interface, I am currently tripping over the use of Collections in design time: I would like to be able to use a standard VB6 "Collection object" in the .NET program - that way, I would be able to specify, in the interface, such a collection as an argument, or as a return type, simplifying the work required for clients to use the interface.

感谢你在前进。

编辑:我不打算使用VB6的集合中的真正的工作.NET计划 - 我会转换VB6的集合尽快和使用适当的.NET集合调用其他方法

I don't intend to use VB6 collections in the "real work" .NET program - I would convert the VB6 collections as soon as possible and call other methods using proper .NET collections.

推荐答案

您不应该使用一个类型如的集合对象从Visual Basic运行在.NET
相反,你应该找一个等价类中的 System.Collections命名空间,最适合您的需要。看看下面的文章,一些指导:

You shouldn't use a type such as the Collection Object from the Visual Basic Runtime in .NET.
Instead you should try to find an equivalent class in the System.Collections namespace that best suits your needs. Check out the following article for some guidance:

  • <一个href="https://web.archive.org/web/1/http://articles.techrepublic%2ecom%2ecom/5100-10878_11-1050541.html"相对=nofollow>在.NET中使用

这篇关于我怎样才能在.NET操纵VB6的集合?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆