FRIHOSTFORUMSFAQTOSBLOGSDIRECTORY
You are invited to Log in or Register a Frihost Account!

How to clear console buffers

 


umeshtangnu
Hi
i have to take input from user in console using Console.Read() and Console.Readline() functions but whenever i use Console.Readline() before Console.Read() , the Console.Read() funtion does not execute
plz help
eg

Code:

using System;
using System.Collections.Generic;
using System.Text;

namespace ConsoleApplication4
{
    class Program
    {
        static void Main(string[] args)
        {
            int x=Console.Read();
            string str = Console.ReadLine();
          int z=  Console.Read();
        }
    }
}
Reply to topic    Frihost Forum Index -> Scripting -> Others

FRIHOST HOME | FAQ | TOS | ABOUT US | CONTACT US | SITE MAP
© 2005-2007 Frihost, forums powered by phpBB.