Источник:
http://gatesasbait.spaces.live.com/B...B9F5!265.entry
==============
Good morning
AX supports basic operations on sets, here's a simple overwiew:
public static void OperationsOnSets(Args _args)
{
Set a = new Set(Types::Integer); //[1,3]
Set b = new Set(Types::Integer); //[2,3]
Set c = new Set(Types::Integer); //Result
;
a.add(1);
a.add(3);
b.add(2);
b.add(3);
c = Set::union(a, b); //[1,3] U [2,3] Result: [1,2,3]
c = Set::intersection(a, b); //[1,3] ? [2,3] Result: [3]
c = Set::difference(a, b); //[1,3] - [2,3] Result: [1]
}

Источник:
http://gatesasbait.spaces.live.com/B...B9F5!265.entry