© 2026 Hedgehog Software, LLC

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

persistent changes to variables across files

i have a few variables in my main file that im trying to read from/write to in the subforms i have. i can load the variables with the values that were set in the main file just fine across every subform, but writing to them is a different story. you can see what im trying to do here (https://github.com/svfeplvce/svedit). the specific variables im trying to read/write are curPoke, curTrainer, pokemonEdit, pokeDataEdit, plibEdit, and trainerEdit. whats supposed to happen is whenever a user switches to a different subform, the values from the last form stay in the variable. what actually happens is it keeps the changes from the first form when displaying data in the first form, although when the user tries to save, it saves the original values. what am i doing wrong here?
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

Environment Variables/Persistent Values in OpenSilver
C#CC# / help
3y ago
❔ How to make changes to files using low space
C#CC# / help
3y ago
Persistent error converting to UTC
C#CC# / help
3y ago
❔ Environment variables vs configuration files for storing secrets
C#CC# / help
3y ago