I don't know if ItemGroup is the right type to use. I will get 4 different booleans that will be true or false depending on choice.
I would like to fill up an ItemGroup with this "strings" depending on the true or false. Is that possible or what should I use?
Example
Anders = true
Peter = false
Michael = false
Gustaf = true
My ItemGroup should then have
Anders and Gustaf.
Is that possible or how should I solve that?
Since you have a bunch of items, it would be better to store them in an
ItemGroupfrom the start since after all that is what it is meant for and it also allows transformations etc. For example this achieves what you want:However if they must be properties, I do not think there is another way than enumerating them all manually like so: