Because ValidUsers.ToString will just return "System.String[]" not the list of array members.
I think this will do it;
Code:Function UserCheck(ByVal user As String) As Boolean Dim ValidUsers() As String = {"Bob", "John", "Steve"} Return Array.IndexOf(ValidUsers, user) > -1 End Function




Reply With Quote