char letter = (char)Console.Read();
The first time through it is fine. The second time I can see in the
debbuger the a line feed is already in there.
I'm using Read instead of ReadLine becuase I just want a single char
instead of a string, and it seems like it would be simplier to do it this
way.
Of course depending on what it takes to get around this issue I might
change my ind.
Nicholas Paldino said:
Steve,
Can you show the code where this is happening? Console.Read shouldn't
be feeding you the line character (I think).
If anything, why not use ReadLine?
--
- Nicholas Paldino [.NET/C# MVP]
- (e-mail address removed)
- Steve - said:
Okay I call Console.Read() twice. However when I come up on my second
Console.Read() ASCII character 10 is already on the console (that's a
line feed).
How do I clear out that line feed before I call Console.Read() again?