Is there a way to initialize a value to a memory address other than a specific value? I have a winform that opens at startup and I'd like it to save the user's previous entries. My (crappy) idea is to embed a text file and read the value from that file into the concerned variables? Is there a more professional / cleaner way of doing what I want?
To be clear, say I have a variable:
string pet = "dog"
A good way of achieving what you want is to use 'Settings'
Once configured, you can set them at user or application level in your code like so:
Properties.Settings.Default.Pet = "dog"; Properties.Settings.Default.Save();