Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 820753
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 15, 20262026-05-15T02:31:46+00:00 2026-05-15T02:31:46+00:00

Ok, this is a total newb question, so please forgive me. What is the

  • 0

Ok, this is a total newb question, so please forgive me.

What is the best way to store variables so that they persist and are recoverable? I have a small application that uses about 10 variables (string and decimal) as settings. Currently, I convert them all to strings, if needed, put them into an array and serialize the array to a file.

This is a pain if I ever want to add a variable. So, I was thinking about using a hashtable and serializing that. Again, not sure what is the best way to do this.

Some requirements I have are that the data needs to be stored securely (encrypted), and must be accessible by other applications (I have two other small apps that read the settings).

I know I am over-complicating something so basic and simple. This must be done in nearly every application built.

TIA

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-15T02:31:47+00:00Added an answer on May 15, 2026 at 2:31 am

    The simpliest, effective and most flexible approach is to create a class, add settings, then serialize/deserialize when needed. This source code for the class can be reused in other assemblies, and persistence can be anywhere. Make sure this class knows how to serialize/deserialize itself because of your security requirement. This ensures the implementation stays with the class. Then the calling assembly just needs to create the object by calling a static/shared method.

    This gives you strongly-typed settings, versioning, ability to add new settings, and even complex data types (other classes). This object can even be passed to other objects as arguments, and since it supports serialization, it is very flexible.

    Example

    See How-To (Object Class => Binary Serialization => To Memory => Encrypt => Save to File) at http://social.msdn.microsoft.com/forums/en-US/netfxremoting/thread/68c200c2-4aa4-48dc-95be-6fe077fd10f4/

    Reference

    • Version Tolerant Serialization at
      http://msdn.microsoft.com/en-us/library/ms229752(VS.80).aspx

    • ISerializable Interface at http://msdn.microsoft.com/en-us/library/system.runtime.serialization.iserializable.aspx

    • Isolated Storage at http://msdn.microsoft.com/en-us/library/3ak841sy.aspx

    • Cryptographic Tasks at http://msdn.microsoft.com/en-us/library/7yx4d854.aspx

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have this query to fetch the total OrderStatus that have values 1 and
I currently have a query that looks like this: SELECT NON EMPTY ([Measures].[TOTAL]) ON
I'm working on learning GWT (total newb) and have a question regarding the Visualiztion
This is probably a total newb question but does anyone know how to make
I have code that looks like this: <h4 class=tableTotals>Total Selected: R<div id=bankTotal>##,##</div></h4> The output
Warning:Total Rails Newb (TRN). This should be a pretty basic question so I'm hoping
Sorry this is a total newb question but there is this really great C-library
I know this is a total newbie question, but the answer may not be
I have this sheet on Excel : Team Total Points Position AJPPR 371,1878896 APP64
I have this code in C (it's for study only): char x; uint64_t total

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.