简体   繁体   English

Visual Basic 6数据结构

[英]Visual Basic 6 data structures

What are all the build in data structures for VB6 (Microsoft Access) ? 什么是VB6(Microsoft Access)的数据结构的内置? I know there are arrays, but are there other more modern data structures? 我知道有阵列,但还有其他更现代的数据结构吗?

断开连接的记录集也很有用: 使用VBA同步两个列表

It has a Dictionary : Does VBA have Dictionary Structure? 它有一个DictionaryVBA是否有字典结构?

And Collection : VBA: Resources for Python Programmer CollectionVBA:Python程序员的资源

The excellent book Hardcore Visual Basic by Bruce McKinney includes some code for creating linked lists, stacks, etc. as part of its introduction to object-based programming with VB6. 由Bruce McKinney撰写的优秀书籍Hardcore Visual Basic包含一些用于创建链表,堆栈等的代码,作为其使用VB6进行基于对象的编程的一部分。 The book is now available free online . 这本书现在免费在线提供

I don't think I understand the question. 我认为我不明白这个问题。 When I read it, I thought of: 当我读到它时,我想到了:

  • Arrays 数组
  • Collections 集合
  • Types 类型
  • Enums 枚举

and so forth. 等等。 Not sure if I'd consider standalone class modules as part of the answer, as they can have any structure you want, rather than being a particular data structure. 不确定我是否将独立类模块视为答案的一部分,因为它们可以具有您想要的任何结构,而不是特定的数据结构。 And, of course, VBA being COM-based, it can use any data structure from compatible COM objects. 当然,VBA是基于COM的,它可以使用来自兼容COM对象的任何数据结构。 This may or may not require a type library (depends on the COM object's implementation). 这可能需要也可能不需要类型库(取决于COM对象的实现)。

You can also create your own (better accessibility/performance XML collections) in this way: 您还可以通过以下方式创建自己的(更好的可访问性/性能XML集合):

MS XML Collections MS XML集合

Also consider using hashtables: 还要考虑使用哈希表:

Hash Tables 哈希表

I written quite a lot of code in VB6 and for sure I used Dictionary and Collection classes a lot. 我在VB6中编写了很多代码,我确实使用了Dictionary和Collection类。 But I still think that they are not enough in many cases, that's why I advise you to take a look at this library: 但我仍然认为在许多情况下它们还不够,这就是为什么我建议你看一下这个库:

http://sourceforge.net/projects/vbcorlib/ http://sourceforge.net/projects/vbcorlib/

that it's a port of .NET libraries to VB6. 它是VB6的.NET库的一个端口。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM