, <ENTER>: t : t
, ^ Read (), . <Enter> . , , . , ( ), . , , ReadKey (). ReadLine ().
Static string ReadLine()
ReadLine () , <Enter>,
string. , IOException .
, Console. In ReadLine ().
// ReadLine().
Using System;
class ReadString { static void Main() { string str;
Console.WriteLine(" ."); str = Console.ReadLine();
Console.WriteLine(" : " + str);
}
}
, , .
.
.
: .
, Console. In Console. TextReader. , Rea.dLine (), TextReader.
// // Console.In.
Using System;
class ReadChars2 { static void Main() { string str;
Console.WriteLine(" .");
str = Console.In.ReadLine(); // ReadLine() TextReader Console.WriteLine(" : " + str);
}
}
, ReadLine () Console. In. , TextReader, Console. In, , .
ReadKey ()
.NET Framework , Console . ReadKey (). ReadKey () . <Enter>. , ReadKey () .
|
|
ReadKey ().
Static ConsoleKeylnfo ReadKey()
static ConsoleKeylnfo ReadKey(bool intercept)
. , . , . intercept true, . intercept false, .
ReadKey () ConsoleKeylnfo, , , .