so in SQL you can do something like:
WHERE title IN('title1','title2','title3')
to test for set membership (assuming i'm using the right phrase here). how can I do this in VB.NET/C#.NET?
Example:
IF textMyTitle.text IN ("title1","title2","title 3") THEN
'Take Action
End If
Obviously the IN part of that statement doesn't work...whats the logical equivalent in .NET?
Try this:
Dim titles As New List(Of String)()
titles.Add("title1")
titles.Add("title2")
titles.Add("title3")
If titles.Contains(textMyTitle.text) Then
// Do something here
End If
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With