© 2026 Hedgehog Software, LLC

TwitterGitHubDiscord
More
CommunitiesDocsAboutTermsPrivacy
Search
Star
Setup for Free
C#C
C#•2y ago•
44 replies
Cyro

How does one typically handle complex program flow?

I seem to be running into a weak spot in my C# journey - that being project management and workflow design.

Embarassingly, I'm in a bit of a head scratcher as to how to handle a moderately-complex flow of an application. I thought this would be a cakewalk - I've dealt with a lot of nitty gritty problems with C#, how hard can simple control flow be?

Apparently, it has hands.

I figured maybe a state machine could help me keep track of the program, but those seem less 'self-running' than maybe I understand, or require in any case. I essentially need a way to say "Okay program, you're at this point so you have XYZ capabilities right now" with those available-to-perform actions changing as the state of the program morphs. And the state of the program should be able to morph by itself at some points - e.g. connecting to server automatically transitions to running the script (or exits), which then transitions to a prompt

Doing this with a wackload of ifs and switches isn't necessarily impossibly complex, but it's just enough on the edge that I don't want to do that here. Especially if I want this to be scalable (e.g. Adding more conditions)

What do you fellas usually use for something like what the picture shows? (Avoid suggesting just biting the bullet and using tons of ifs/switches, I want to learn something new here)
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

✅ How to handle complex Include in EF Core
C#CC# / help
2y ago
✅ Typically how is an image stored?
C#CC# / help
2y ago
How does Newtonsoft.Json.JsonConverter handle nullable structs?
C#CC# / help
4y ago
❔ Why does this program close?
C#CC# / help
3y ago