NumberList Object

Description

A list of numbers (longs). The class is better than a generic collection because it enforces type safety.

Methods

Count

Item

Add

Remove

Clone

Clear

Example

Set nl = CreateObject("Toolsack.NumberList")
nl.Add 1
nl.Add 2
nl.Add 3
 
MsgBox "There are " & nl.Count & " items in the list"
MsgBox "the second item is : " & nl(1)
nl.Remove (1)
 
MsgBox "There are " & nl.Count & " items in the list"
nl.Add 4
MsgBox "the second item is : " & nl(1)
nl.Add 5, 1
MsgBox "the second item is : " & nl(1)
 

Samples

Articles



We always want to hear your feedback. Send to feedback@toolsack.com.
© 2000-2001 Toolsack Software Ltd.