© 2026 Hedgehog Software, LLC

TwitterGitHubDiscord
More
CommunitiesDocsAboutTermsPrivacy
Search
Star
Setup for Free
C#C
C#•2y ago•
38 replies
ClownAcademy

Beginner questions. prevent unhalted exception

I am really in the most beginner stage you can imagine though I have been messing around with other languages before so I know some stuff. I want to effectively use a beginner friendly option to prevent any other input but "y" or "n" to be accepted, which works fine, however null **values, CTRL + Z will still cause error.** Any advice without introducing classes, preferable a control flow based solution to prevent this null; (CTRL + Z ABORT) from breaking it? Here is my code: https://onecompiler.com/csharp/42qqt9jk5
image.png
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

Beginner Questions
C#CC# / help
2y ago
beginner, two questions about arrays and counting?
C#CC# / help
2y ago
✅ beginner
C#CC# / help
3y ago
✅ beginner
C#CC# / help
3y ago