Main Site Documentation

Storing User Data


#1

Please pardon my igorance in regards to the allocation of string data in C#.

I want to store user data strings that will not be moved or reinitalized between runtimes, and prefer not to use a SD card.

I would think the data would need to be stored in a static, compile-time, location and not a dynamic, runtime, location. The data I want to store is string data, but a byte arrays would work if that is easier to allocate space for at compile-time and not runtime.

Thank you in advance for any assistance.
Carl


#2

You need to research EWR, Extended Weak Reference. That is, assuming you’re on a platform that supports it (Cobra/EMX do IIRC; USBizi doesn’t).

Failing that, 24LC256 or similar is a really simple chip to use :slight_smile:


#3

Brett,

Yes, I am using a FEZ Cobra, and Extended Weak Reference seems to be exactly what I need.

Thank you for your help.
Carl


#4

Hi Carl. You said static data and compile time, but was not clear if that data needed to change and be preserved. If no, then static and/or const vars in your program would work also.