View Single Post
  #29 (permalink)  
Old 08-28-2008, 09:39 AM
Xav's Avatar   
Xav Xav is offline
Code Slinger
 
Join Date: Mar 2008
Location: The North Pole
Posts: 11,038
Last Blog:
Web slideshow in JavaS...
Credits: 1
Rep Power: 86
Xav has much to be proud ofXav has much to be proud ofXav has much to be proud ofXav has much to be proud ofXav has much to be proud ofXav has much to be proud ofXav has much to be proud ofXav has much to be proud of
Send a message via MSN to Xav
Default Re: C# Tutorial: Writing Text Files

It's that new line - Console.Read() reads a single character from the input. Therefore, when you type, the first letter goes to the Console.Read() bit, and the rest goes to the Console.ReadLine(), which is put in the buffer. Therefore, try this instead:
Code:
string buffer = Console.Read().ToString() + Console.ReadLine();
__________________


Mr. Xav | Website | Forums | Blog
Reply With Quote