Skip to main content

Convert-to-Array

Command Description

Convert a set to an array Typically used to traverse a set

Command Prototype

arrSet = Set.ToArray(objSet)

Parameter Description

ParameterRequiredTypeDefaultDescription
objSetTrueexpressionobjSetThe set to be converted

return

arrSet,The variable used to save the output of the command.

Demo

Dim ObjSet 
Dim arrSet
ObjSet = Set.Create()
Set.Add(ObjSet,1)
Set.Add(ObjSet,2)
Set.Add(ObjSet,3)
// ObjSet = {1,2,3}

arrSet = Set.ToArray(objSet)
TracePrint(arrSet)
/**
arrSet = [
1,
2,
3
]
*/