If I have the following structure:
Public Class UserData
Public ID As String
Public Name As String
End Class
How can I select it in a conditional like this?
Dim myUsers As New System.Collections.Generic.List(Of UserData)
If myUsers.Contains(.ID = "1") = True Then
...
I know that myUsers.Contains(.ID = "1") is totally wrong, but I am curious how to do something like that? Is it possible? Is this a job for LINQ?
How about this:
Of course, if you’re going to do this more than once, you’ll probably be better off creating a set to search in:
My vb is rusty. Please forgive syntax errors