vb.net - Need to catch if a string has a number in it vb -



vb.net - Need to catch if a string has a number in it vb -

i want add together grab statement see if targetword has number inputted it.

console.writeline("enter word want guess: ") targetword = console.readline

if want know if given string contains digits can utilize char.isdigit:

dim input = console.readline() ' example: abc123def dim digits = input.where(addressof char.isdigit) if digits.any() ' ... end if

so if want inquire user new string until enters 1 without digits:

while digits.any() input = console.readline() digits = input.where(addressof char.isdigit) end while

vb.net try-catch

Comments

Popular posts from this blog

maven fortify plugin : Unable to load build session with ID XXXXX .. See log file for more details -

c# - Primavera WebServices does not return any data -

android - Display emoji panel with genymotion - keyboard/touch input? -