© 2026 Hedgehog Software, LLC

TwitterGitHubDiscord
More
CommunitiesDocsAboutTermsPrivacy
Search
Star
Setup for Free
C#C
C#•15mo ago•
21 replies
Cykotech

Iterate through Enums

If I want to make an action iterate through an enum everytime it's taken, obviously I would just use
object++;
object++;
but what do I except when I reach the max value and want it to return back to the min value? And if a simple increment doesn't work how would I loop through the enum as such?
C# banner
C#Join
We are a programming server aimed at coders discussing everything related to C# (CSharp) and .NET.
61,871Members
Resources
Recent Announcements

Similar Threads

Was this page helpful?

Similar Threads

✅ Iterate through a genereic type list
C#CC# / help
3y ago
❔ Iterate over a range
C#CC# / help
3y ago
✅ Enums in C#
C#CC# / help
13mo ago