advertisement

Find Code  Advanced Search   

browse free vb code
Submit Code
ASP,  HTML, and XML
Database
Dates  and Math
Files  and Directories
Forms  and Controls
Lists,  Collections, and Arrays
Miscellaneous
Multimedia/Games
Office/VBA
Network/Internet
Registry
Screen/Graphics
String  Manipulation
System/API
Windows  2000/XP
VB.NET/ASP.NET



advertisement
Hive - Alternative to Collection and Dictionary

Author: Omar Al Zabir
Category: Lists, Collections, and Arrays
Type: Classes
Difficulty: Intermediate

Version Compatibility:  Visual Basic 5   Visual Basic 6  

More information: Better, Faster and more rich than Collection and Dictionary

It supports non string keys. You can use Date or Number as a key. Very useful for storing numbered items or calendar information where the key is a date.

It has Auto key generation feature. Items can be added without any key for indexed based access. Auto Key is a GUID which is always unique.

Much faster than VB's Collection even faster than the Dictionary object.

It supports multiple items with same key. It also provides FindFirst, FindNext methods like ADO Recordset for duplicate key.

It supports both case sensitive and non case sensitive key matching support at run-time.

Its Clear method immediately releases memory very efficiently for both object and variant data type.

It supports "Exists" method to check whether a key exist or not.

It supports value modification which is not present in collection. Any value for a key can be reassigned at any time.

It supports Key method to get a key from index.

It can replace VB Collection's code without any change.

It can record errors raised from invalid add, remove. It provides an error collection like ADO's Error collection. Error raise can be turned off anytime.

It uses a balanced binary tree (Red Black Binary Tree) for better performance than standard Binary Tree based data structures.

This code has been viewed 73972 times.

Instructions: Click the link below to download the code. Select 'Save' from the IE popup dialog. Once downloaded, open the .zip file from your local drive using WinZip or a comparable program to view the contents.

source/Hive.zip

Sponsored Links

internet.commediabistro.comJusttechjobs.comGraphics.com

Search:

WebMediaBrands Corporate Info

Legal Notices, Licensing, Permissions, Privacy Policy.
Advertise | Newsletters | Shopping | E-mail Offers