Reading numbers from a text file

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
 
W

White Spirit

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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top