In

Public Function [In](Of T)(ByVal objCompareFrom As T, ByVal ParamArray objCompareTo As T()) As Boolean
  For Each compareToSingle As T In objCompareTo
    If objCompareFrom.Equals(compareToSingle) Then _
      Return True
  Next
  Return False
End Function
Example:
If myName.In("Ryan","Todd","Brian") Then _
  DoMyFunction()

If currentClient.In(firstClient,secondClient,thirdClient) Then _
  DoMyFunction()

Description

Strongly typed code version of the common IN clause for SQL.

Details

Double click on the code to select all.

 

;