C
C#3y ago
Taylor.

option 4 and option 5 doesnt work

i dont understand how to fix it im so consfuse
7 Replies
Angius
Angius3y ago
Define "doesn't work"
Taylor.
Taylor.OP3y ago
Angius
Angius3y ago
Where's the code that actually lets the user select the options?
Taylor.
Taylor.OP3y 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
Angius3y 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
Althos3y 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.OP3y ago
thanks for the all the help pepepray i had figured it out pepepray

Did you find this page helpful?