Is there a way to convert some code like this:
If someString <> \"02\" And someString <> \"03\" And someString <> \"06\" And someString <>
Dim invalidvalues As New List(Of String) From { _ "02", _ "03,", _ "04", _ "07" _ } If invalidvalues.Contains(x) Then btnButton.Enabled = False End If