Reading numbers from a text file

  • Thread starter Thread starter ssamuel
  • Start date Start date
S

ssamuel

If you're reading from a text file, the character or byte, however you
cast it, is an ASCII character. I think you've found this.

Int32.Parse() will turn a character or string into an int.



Stephan
 
I'm trying to read a number from a text file into a type int. I've read
the byte into an int, i. I then try to do something like int number =
(int) (char) i. However, number still has the ASCII value of the number.
 
Back
Top