Thursday 15 March 2012

integer - how to read only numbers from text file in vb.net -


Hello people, as a topic, I want to do VB.net in a script which only *. File

Example:

Text File: asd4lkj5fdl jklj235

Result: 45235

I did a research on Google and come here nothing With this, I saw an answer here but in CI only knew that in theory it should be like this: Ask every four loop to read if it is an integer, then add it to a new string, if not up to the next four The end of the stream then runs

Thanks to one!

  1. Read the file in a string
  2. via each The loop is checking the alphabetical number. Dim strings as string = string as

      dim stratphoffile string = IO.File.ReadAllText ("C: \ filename.txt"). Stratiform file file for each C if IsNumeric (c) then strResults + = c end next MsgBox (strResults)      

No comments:

Post a Comment