Results 1 to 3 of 3

Thread: [RESOLVED] Why does this Array Check Return False?

Threaded View

  1. #2
    Frenzied Member
    Join Date
    Jun 2005
    Posts
    1,950

    Re: Why does this Array Check Return False?

    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
    Last edited by Bulldog; Jun 18th, 2007 at 04:00 PM.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width