.net - Checking the datatype in every line in vb.net -


i want know how possible check type of data (integer/char) first letter in every line of inputfile is.
wasn't able find answered question, because didn't know how i'm supposed search after this.

for example in inputfile built this:

birthdate;name 19920711;john 19801106;alex 19950327;sam 

now want filter out dates without names , headline. how possible?.

you can use char.isdigit , or char.isletter

for example:

using sr new streamreader("c:\myfile")         until sr.endofstream             dim line = sr.readline             if line.length > 0                 if char.isletter(line(0))                     debug.writeline("first char letter")                 elseif char.isnumber(line(0))                     debug.writeline("first char number")                 end if             end if         loop     end using 

Comments

Popular posts from this blog

gridview - Yii2 DataPorivider $totalSum for a column -

java - Suppress Jboss version details from HTTP error response -

Sass watch command compiles .scss files before full sftp upload -