Ā© 2026 Hedgehog Software, LLC

TwitterGitHubDiscord
More
CommunitiesDocsAboutTermsPrivacy
Search
Star
Setup for Free
C#C
C#•3y ago•
47 replies
Healer

Is there a 'foreach' equivalent for parts of a class?

I have a class (Stored) defined that has strings stored (Name, ID, and Data, then some others I havent settled on a name for). Many of these are going to be integers stored as strings and would like to be able to go down each element whenever a Stored object is inputted and format them in a certain way if they are actually a number.
I'm not familiar with how foreach works but from what I've read it can't be used for classes - is there an equivalent I can use to accomplish this?
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

ā” āœ… Help with searching a class of classes for something?
C#CC# / help
3y ago
Foreach loop inside List<T> class
C#CC# / help
3y ago
Is there a way for the style to not affect some parts of the paragraph?
C#CC# / help
4y ago
ā” how to create a class equivalent to another
C#CC# / help
3y ago