Set type parameters?

Can’t remember if I’ve asked this before but…

Is there a way of using set type parameters? I have an enumeration defined but want to pass a set of those enumerated types to a service function.

The only way I can see is to create an array of the enumerated type but this is very clunky.

you can create a method which will transform a set of enumerations to Integer or Int64. enumeration’s values can be stored as bits so Integer can hold 32 values and int64 - 64 values.

Yeah that could work - ideally I’d like to make such a function generic, so I could use it on any enumerated type, rather than have to duplicate it for each one

you can pass enum values as ord values, i.e. [ord(enum1), ord(enum2)].
in method you can use shl.
so, for passing enum1 and enum2, it can be like

(1 shl ord(enum1)) + (1 shl ord(enum2))