Set::create Method [AX 2012]
Creates a set from the container obtained from a prior call to the Set.pack method.
The following example creates a set and packs it into a container. The create method is then used to unpack the container and create a set identical to the original one.
{
Set is1, is = new Set (Types::Integer);
int i;
container packedSet;
;
// Add 10 integers (0 - 9) to the set
for (i = 1; i <= 10; i++)
{
is.add(i);
}
// Pack the set into a container...
packedSet = is.pack();
// ... and restore it
is1 = Set::create(packedSet);
print is1.toString();
pause;
}
Show: