C#C
C#4mo ago
killa.rei

✅ Selection using spectre.console

``cs
using Spectre.Console;
using System.Threading.Channels;
void choiceMenu()
{
var choice = AnsiConsole.Prompt(
new SelectionPrompt<string>()
.AddChoices(new[] {
"1| Reboot Audio Systems"
, "2| Reboot Camera Systems"
, "3| Reboot Ventilation System"
, "4| Reboot All Systems"
}));

}

Console.Beep(1500, 800);



if ( = );
Console.Beep(1200, 800);
Console.Write("0");
I want to make it so that when option 1 is selected (audio systems) it runs console.beep and prints "0".

using choiceMenu in the if statement:
cs
if (choiceMenu = 1 ;
Console.beep(1000, 800);
```
only gives me a method group error.

I dont know how to go about this, please help
20250527_125505.jpg
Was this page helpful?