Is it possible to store a string in the embedded resources of a device at runtime, so that when the device reboots it will remember the string and be able to use it on next boot.
I ask because I would prefer not to have to use an SD card for each device.
I feel the answer is no because then no-one would use SD cards unless they had a large amount of data to store.
Okay so I’ve had a play with the code now.
I put it on a Fez Spider and a Netduino Plus, it didn’t do what I expected it to do.
With the Spider the object would be saved but it only seemed to work correctly while the device had power. So stopping and starting the program in debug would increase the saved start-up number. However removing the power and powering it back up again would reset the memory.
The Netduino couldn’t seem to handle saving the start-up number at all.
I was looking for a method to save data upon power loss which I originally forgot to mention.
I don’t think either of my devices were designed for such a thing. I will see about getting a flash module instead maybe.
@ Mike - Thanks Mike, flushing the data was exactly what I needed to do.
If anyone else is looking to do EWR, you need a reference to GHI.Premium.System;
and the method is GHI.Premium.System.Util.FlushExtendedWeakReferences();