© 2026 Hedgehog Software, LLC

TwitterGitHubDiscord
More
CommunitiesDocsAboutTermsPrivacy
Search
Star
Setup for Free
C#C
C#•6mo ago•
23 replies
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:
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
C# banner
C#Join
We are a programming server aimed at coders discussing everything related to C# (CSharp) and .NET.
61,871Members
Resources

Similar Threads

Was this page helpful?
Recent Announcements

Similar Threads

Console.ReadKey() binds to Consolekeyinfo
C#CC# / help
4y ago
Spectre.Console Status not showing, app seems to stop
C#CC# / help
3y ago
❔ Uno using c# console
C#CC# / help
3y ago
Console showing ←[92m using ansi
C#CC# / help
3y ago