Sub AppStart (Args() As String)
Dim set1 As B4XSet = B4XCollections.CreateSet2(Array(2, 3, 4, 7))
Dim set2 As B4XSet = B4XCollections.CreateSet2(Array(1, 2, 3, 4, 5))
Dim x As B4XSet = Xor(set1, set2)
Log(x.AsList)
End Sub
Private Sub Xor(set1 As B4XSet, set2 As B4XSet) As B4XSet
Dim res As B4XSet
res.Initialize
For Each o As Object In set1.AsList
If set2.Contains(o) = False Then res.Add(o)
Next
For Each o As Object In set2.AsList
If set1.Contains(o) = False Then res.Add(o)
Next
Return res
End Sub