Cant methods do ReadKey() and ReadLine() by their own or am i forced to use parameters
I can use parameters but i am making a looped arrow key menu so it would not be optimal
19 Replies
$code
To post C# code type the following:
```cs
// code here
```
Get an example by typing
$codegif
in chat
For longer snippets, use: https://paste.mod.gg/sure you can call
Console.ReadLine()
pretty much anywhere. Is it a good idea to do so? Not always.
if your program is only ever gonna be a console app, and you dont want a centralized way to change potential styling etc, then its fineTo post C# code type the following:
```cs
// code here
```
Get an example by typing
$codegif
in chat
For longer snippets, use: https://paste.mod.gg/three of them, then
cs
, then paste your code, then another three```cs
code
```
the start and end tags must be on new lines
this is the main
So close lol
they are on seperate files
Yeah, and what is the issue?
The code seems fine as it is
when i press the arrow the menu dosent budge
seems like the method dosent really listen to readkey
i would really like to not use parameters
you dont need to.
use a breakpoint and the debugger to figure out what is going wrong
its not the
Console.ReadKey()
is it because im not looping the logic inside the method?
if yes (slaps face)
if no (slaps face twice)
use the debugger
check what value your
key
variable has after you press an arrow key.did it
mhm?
and what value did it reveal?
short story it works but i just needed a loop and clear to make it work
as i intented
tl:dr i have major brain damage