Visual Basic provides the StartsWith and EndsWith methods for determining whether a specifi c sequence of characters occurs at the beginning or end, respectively, of a string. The StartsWith method’s syntax is string.StartsWith(subString), and the EndsWith method’s syntax is string.EndsWith(subString). Open the City Solution (City Solution.sln) file contained in the VB2010\Chap08\City Solution folder. The interface provides a text box for the user to enter the name of a city. The Add to List button’s Click event procedure should add the city name to the list box, but only if the city name begins with either the letter L or the letters Ch. The letters can be entered in uppercase, lowercase, or a combination of uppercase and lowercase. Code the procedure. Save the solution and then start and test the application. Close the Code Editor window and then close the solution.
Already registered? Login
Not Account? Sign up
Enter your email address to reset your password
Back to Login? Click here