Link to home
Start Free TrialLog in
Avatar of GivenRandy
GivenRandy

asked on

StartsWith Select Case

Is there a slick way to use the StartsWith in combination with a Select/Case? Something like this (which doesn't compile):

        Select Case TextBox1.Text.ToUpper
            Case String.StartsWith("AB")
            ' ...
        End Select

Instead of a bunch of:

 If TextBox1.Text.ToUpper.StartsWith("AB") Then
 ElseIf ..  ("CD")

and so on.
ASKER CERTIFIED SOLUTION
Avatar of AlexFM
AlexFM

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of GivenRandy
GivenRandy

ASKER

That's the way I had done it. Didn't know if they was some Framework trick I was missing (the thing is massive).