Q:

VB Evaluate two integers with a list

I want to evaluate two integers separated with values of list of two integers.

For example:
i receive two integers from two variables

id1 = 1
id2 = 2

Then i have a list of two integers

1 - 2
4 - 6

I want to check if that ids are in the list of integers together. Since we cannot do 
For e = 0 To excluidos.Count
    If misGallos(i).taquillaP = excluidos(e).id1P Or excluidos(e).id2P And _
       misGallos(j).taquillaP = excluidos(e).id1P Or excluidos(e).id2P Then

        MsgBox("igua")
    End If
Next e

I dont know whats the better way to do it. If i should put those ids in another list to compare both list or if exist any method to put those ids together and check if there are equals on the list.

A:

That's because your logic is wrong, try something like this:
    Dim List1 As New List(Of Integer) From {1, 3, 5, 22}
    Dim List2 As New List(Of Integer) From {2, 4, 8, 12}
    Dim ID1 As Integer = 22
    Dim ID2 As Integer = 12

    If List1.Contains(ID1) Then

        If List2.Contains(ID2) AndAlso List2(List1.IndexOf(ID1)) = ID2 Then 'is present on list and same row
            Debug.Print("hi1")
        End If

    ElseIf List2.Contains(ID1) Then

        If List1.Contains(ID2) AndAlso List1(List2.IndexOf(ID1)) = ID2 Then 'is present on list and same row
            Debug.Print("hi2")
        End If

    End If

