© 2026 Hedgehog Software, LLC

TwitterGitHubDiscord
More
CommunitiesDocsAboutTermsPrivacy
Search
Star
Setup for Free
C#C
C#•4y ago•
31 replies
Grin

How to call a function when you don't know what function to call?

I'm making a small guessing game to learn more about methods. I want to use picture boxes for states and am utilizing a class that stores the state number, name, and name of the picture box. I have a random number between 1 & 50 that chooses the state. When that number is determined I want a foreach(iteration in state) to go through the state numbers and find the correct state to enable (make the picture of the state visible) with a pictureName.Visibible = true but this doesn't seem possible. Can anyone point me in a good direction on how to handle this?
Capture.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

❔ i don't know how to start.
C#CC# / help
4y ago
I don't know what identifier to give this
C#CC# / help
4y ago
I don't know how to do this
C#CC# / help
2y ago
I don't know what to do, where to start!
C#CC# / help
10mo ago