C
C#17mo ago
Taylor.

option 4 and option 5 doesnt work

i dont understand how to fix it im so consfuse
7 Replies
Angius
Angius17mo ago
Define "doesn't work"
Taylor.
Taylor.17mo ago
Angius
Angius17mo ago
Where's the code that actually lets the user select the options?
Taylor.
Taylor.17mo 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
Angius17mo 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
Althos17mo 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.17mo ago
thanks for the all the help pepepray i had figured it out pepepray
Want results from more Discord servers?
Add your server
More Posts
❔ ✅ EFCore: How to add entity with one-to-many relationship without navigation property in 1 queryIn my `ApplicationUser` class I have `Characters` property (see screenshots), but `Character` does nVs2022 - Any way to change icons back to vs2019 or less?So I recently switched to Vs2022 and was wondering if you could revert the icons back to the origina❔ Need help explaining precedence in C#```csharp int x = 10; int y = 20; x += y += y = 5; Console.WriteLine(x) //Output 35 ``` Why is the a❔ Need Ideas. Switching from Reflections to Source GenI'm writting a game engine, currently using reflections to show what the User Assembly (the scripted❔ Creating a gridTrying to create a 5 x 5 grid, but because object is 3d it shows up sideways ``` using UnityEngine;❔ Suppress Visual Studio IDE0270 style rule without adding '.editorconfig'I have some cases in my code where I have if statements like the following: ```cs User? user = Users❔ xaml questionIs it possible to use custom parameters for a template in xaml? So for example if i want to use a gr❔ How to Require Property for Serialization?Hello, I'm working on a library for the Unity game engine that interfaces with an API. Some of the ❔ Is there a way to get Textchunk Width?something like TextChunk.GetWidth() which to get a character width..not the TextChunk.CharSpaceWidth❔ protocol for sending small amounts of data for long periods of timeWhat the title says:) I was thinking between mqtt or grpc, maybe just websockets? But the pub/sub mo