0
Where to use read (),readline () and readkey ()???
2 Respostas
+ 1
read()
returns a integer value of the first character
do not use it anymore, readline is a beter option
https://msdn.microsoft.com/en-us/library/system.console.read(v=vs.110).aspx
readline
returns a string
https://www.dotnetperls.com/console-readline
readkey
returns a ConsoleKeyInfo.
This datatype gives a lot of information of the key(s) that was pressed.
It is easy to test which key it was
for example
if (info.Key == ConsoleKey.Escape)
https://www.dotnetperls.com/console-readkey
readkey does not work in the playground, so you have to test it in your own enviroment
https://code.sololearn.com/c9VAXYW9kMsD
0
I don't understand the question, isn't it obvious?