我有以下代码,我想要做的是让控制台读取按键并将其存储在变量中,如Console.ReadLine
,但不需要按 Enter 在该行的末尾。
Dim Player As charStats
Console.WriteLine("In order to create your character, You must first choose a name for your Character")
Console.WriteLine("Is your character Male or Female? (M/F)")
Dim mOrF As String = Console.ReadLine().ToLower
答案 0 :(得分:1)
猜测Console.ReadKey()
就是你想要的。
http://msdn.microsoft.com/en-us/library/system.console.readkey(v=vs.110).aspx