Sub getidlist(us As List,user As String) As Int
For i = 0 To us.Size-1
Dim map As Map = us.Get(i)
If map.Get("UserName").As(String) = user Then ' If the condition is correct, I want to exit the sub and return the value of i
Exit '***
Return i '***
End If
Next
Return -1
End Sub