Private Function InList(ByVal searchedWord As String, ByVal ParamArray listOfWords() As String) As Boolean For Each word As String In listOfWords If word = searchedWord Then Return True End If Next Return False End FunctionIt uses a feature from VB.NET (also existing in C#) called array parameters. The reserved word ParamArray at the function signature indicates that the function can receive a variable number of parameters from the second parameter on. The values passed as parameters are stored into an array and you can access its members as you'd normally do with regular arrays.