How do I encode numbers using OEM 437?

I am writing a file using the encoding code below...

It works fine when all of the data is a straight text string, but I am running into problems when numbers are involved.  For instance, the number 45 is treated as 4 and 5(the resulting output data is 3435), not fifty (should spit out the character "-" which is also 2D).  Any ideas as to what I am missing?  Thanks.
LVL 1
drunk_irishmanAsked:
Who is Participating?
 
drunk_irishmanConnect With a Mentor Author Commented:
Figured it out, so for anyone else.....

wr.WriteLine((char)45);

That was the solution, I needed to cast the value as a char.
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.