How to write a contains statement to match a member of a class?
- by afuzzyllama
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 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?