C
C#9mo ago
Kinda Ducky

If(readresult) not working?

It's looping in the prompt to write the user, only works with "exit" (while (menuSelection != "exit");)
No description
3 Replies
Angius
Angius9mo ago
Console.ReadLine() is null only in some specific edge cases Did you perhaps want to see if it's empty?
Pobiega
Pobiega9mo ago
Did you perhaps want to use string.IsNullOrEmpty instead? or maybe even string.IsNullOrWhitespace also, its usually recommended to "invert" those if-statements instead of checking "hey is this value valid, then lets go on" you check "hey is this value INVALID, then we stop" it stops your code from becoming a pyramid of indentions
Buddy
Buddy9mo ago
Your switch case is useless First you are checking if menuSelection is "1", then you have a switch case checking if it is "human"
Want results from more Discord servers?
Add your server