Microsoft.VisualBasic.Collection替换? [英] Microsoft.VisualBasic.Collection replacement?

查看:70
本文介绍了Microsoft.VisualBasic.Collection替换?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

哪个vb.net对象是vb6集合类的最佳匹配?

具体来说,我希望能够使用

索引访问Item属性或者是一个关键字符串。


我编写了自己的类,它继承自集合库并使用

arraylist来保存值,但是我错过了Item(string)属性。我想
假设我可以通过集合迭代并寻找一个字符串匹配,但

我认为可能有一种更简单的方法。


谢谢,


Craig

Which vb.net object is the best match for the vb6 collection class?
Specifically, I would like to be able to access the Item property with an
index or a key string.

I wrote my own class that inherits from the collectionbase and uses an
arraylist to hold values, but i''m missing the Item(string) property. I
suppose I could iterate thru the collection and look for a string match, but
I thought there might be an easier way.

Thanks,

Craig

推荐答案




看一下哈希表。




---------------

" Craig Buchanan" <所以***** @ microsoft.com>在消息中写道

news:e9 ************* @ TK2MSFTNGP12.phx.gbl ...
Hi,

Take a look at the hashtable.

Ken
---------------
"Craig Buchanan" <so*****@microsoft.com> wrote in message
news:e9*************@TK2MSFTNGP12.phx.gbl...
哪个vb.net对象是vb6集合类的最佳匹配?
具体来说,我希望能够使用
索引或键字符串访问Item属性。

我自己编写了继承自集合库并使用
arraylist来保存值的类,但我缺少Item(字符串)属性。我想我可以通过集合迭代并寻找字符串匹配,
但我认为可能有一种更简单的方法。

谢谢,
Craig
Which vb.net object is the best match for the vb6 collection class?
Specifically, I would like to be able to access the Item property with an
index or a key string.

I wrote my own class that inherits from the collectionbase and uses an
arraylist to hold values, but i''m missing the Item(string) property. I
suppose I could iterate thru the collection and look for a string match, but I thought there might be an easier way.

Thanks,

Craig






看一下哈希表。


Ken

---------------

" Craig Buchanan" <所以***** @ microsoft.com>在消息中写道

news:e9 ************* @ TK2MSFTNGP12.phx.gbl ...
Hi,

Take a look at the hashtable.

Ken
---------------
"Craig Buchanan" <so*****@microsoft.com> wrote in message
news:e9*************@TK2MSFTNGP12.phx.gbl...
哪个vb.net对象是vb6集合类的最佳匹配?
具体来说,我希望能够使用
索引或键字符串访问Item属性。

我自己编写了继承自集合库并使用
arraylist来保存值的类,但我缺少Item(字符串)属性。我想我可以通过集合迭代并寻找字符串匹配,
但我认为可能有一种更简单的方法。

谢谢,
克雷格
Which vb.net object is the best match for the vb6 collection class?
Specifically, I would like to be able to access the Item property with an
index or a key string.

I wrote my own class that inherits from the collectionbase and uses an
arraylist to hold values, but i''m missing the Item(string) property. I
suppose I could iterate thru the collection and look for a string match, but I thought there might be an easier way.

Thanks,

Craig



" Craig Buchanan" <所以***** @ microsoft.com> schrieb
"Craig Buchanan" <so*****@microsoft.com> schrieb
哪个vb.net对象最适合vb6集合
类?具体来说,我希望能够使用索引或键字符串访问Item
属性。

我编写了自己的类,它继承自集合库并使用
arraylist持有值,但我错过了Item(string)
属性。我想我可以通过集合迭代并寻找字符串匹配,但我认为可能有一种更简单的方法。
Which vb.net object is the best match for the vb6 collection
class? Specifically, I would like to be able to access the Item
property with an index or a key string.

I wrote my own class that inherits from the collectionbase and uses
an arraylist to hold values, but i''m missing the Item(string)
property. I suppose I could iterate thru the collection and look for
a string match, but I thought there might be an easier way.




Microsoft.VisualBasic.Collection不是VB6的一部分,它是VB.NET

和Framework的一部分。你可以使用它。它不是兼容性

库的一部分,仅出于兼容性原因。


-

Armin



Microsoft.VisualBasic.Collection is not a part of VB6, it''s a part of VB.NET
and the Framework. You can use it. It is not part of the compatibility
library that is only there for compatibility reasons.


--
Armin


这篇关于Microsoft.VisualBasic.Collection替换?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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