Skip to content

Modern Set Items

Paul Squires edited this page Oct 19, 2026 · 5 revisions

Home › Set › Set › Items

Items

Returns a copy of all the values as an Array, in no particular order.

Syntax

Items( ) as Array( of T )

Examples

#import "std/containers"
using containers

dim seen as Set( of integer )
for i as integer = 1 to 3
    seen.Add( i )
next

'' A snapshot as an Array, not a live view
dim xs as Array( of integer ) = seen.Items( )
print xs.Count               '' 3

'' ITERATION ORDER IS UNSPECIFIED -- sort the snapshot when the output
'' has to be reproducible

Library: Set
Category: Set
Documented under: Members

Clone this wiki locally