C
C#2y ago
Taylor.

option 4 and option 5 doesnt work

i dont understand how to fix it im so consfuse
7 Replies
Angius
Angius2y ago
Define "doesn't work"
Taylor.
Taylor.OP2y ago
Angius
Angius2y ago
Where's the code that actually lets the user select the options?
Taylor.
Taylor.OP2y ago
[21:25, 04/03/2023] Z.: where is the code for the user to select the options ah [21:28, 04/03/2023] Yang Heng: public static string Intro() { Console.WriteLine(" **Main page***"); Console.WriteLine("**"); Console.WriteLine("Select Option"); Console.WriteLine("1. Display files in Image Folder"); Console.WriteLine("2. Display files in Text Folder"); Console.WriteLine("3. Display files in Text + Images Folder"); Console.WriteLine("4. Perform sorting of files to image and text folders"); Console.WriteLine("5. Perform check on abnormal content in text file"); return "complete intro"; }
Angius
Angius2y ago
This just displays some text Where's the code that takes the input from the user, and then calls Option1(), Option4() etc. methods?
Althos
Althos2y ago
Yes, all Console.WriteLine does is display the text you supplied it to the console, to read user inputs, you need to use either Console.ReadKey() or Console.ReadLine(), depending on whether you need to read a character or a string input You'll also have to ensure that whatever the user inputted is one of the expected inputs
Taylor.
Taylor.OP2y ago
thanks for the all the help pepepray i had figured it out pepepray
Want results from more Discord servers?
Add your server