C# Console In
Description
Console In
gets the standard input stream.
Syntax
Console.In
has the following syntax.
public static TextReader In { get; }
Example
The following sample illustrates the use of the In property.
/*from ww w . j av a 2 s .co m*/
using System;
using System.IO;
class InTest {
public static void Main() {
TextReader tIn = Console.In;
TextWriter tOut = Console.Out;
tOut.WriteLine("Hola Mundo!");
tOut.Write("What is your name: ");
String name = tIn.ReadLine();
tOut.WriteLine("Buenos Dias, {0}!", name);
}
}