reverse order in set collections

A-B-C-D-E → as not
E-D-C-B-A → want to get this as

How can I edit the following code ?

Thank you for everything

static void ReverseOrder(Args _args)
Set s1 = new Set(Types::String);
int i;
SetIterator si;
si = new SetIterator(s1);

while (si.more())

Set doesn’t keep sequence, think about using X++ List. This page can be used for reference:…/list.aspx

Hi Kwen,
I know that it. Is there a way i want to research.

Thank you anyway.

Do you mean whether there is a way to make a set to keep items in a specific order? No, that would contradict the definition of set. It wouldn’t be a set anymore.

I want to get out of the rules. Just wondered.
Thanks anyway