VendingMachine.Console.AbstractConsoleReadBuffer.ReadLine C# (CSharp) Method

ReadLine() public method

public ReadLine ( ) : string
return string
        public string ReadLine()
        {
            while (this.Read() != '\n');

            return this.History.Last();
        }

Usage Example

Example #1
0
        protected override string ReadCommand()
        {
            string command = "";

            do
            {
                System.Console.Write(mReadBuffer.Prompt);
                command = mReadBuffer.ReadLine();
            }while (string.IsNullOrWhiteSpace(command));

            return(command.Trim());
        }