Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    text
    copied!<p>If you're looking for simple, I have two words for you: <a href="http://msdn.microsoft.com/en-us/library/72hyey7b.aspx" rel="nofollow noreferrer"><strong>binary serialization</strong></a>.</p> <p>The serialization capabilities built into the .NET Framework are awesome for tasks like this, where you just want to spit some of your program's instance data out to disk without worrying about writing a bunch of code yourself.</p> <p>Since you're not worried about adhering to any kind of an open or standard data format, there's no benefit to XML serialization. Just choose a custom file extension to use for your application (preferably one that's not already in use by very many others—remember you don't necessarily have to limit yourself to just 3 characters), and then associate that file extension with your application in the Windows shell.</p> <p>Of course, this won't do anything to <em>encrypt</em> the data. Someone could still open up your data file in Notepad and see its contents, but they won't be very pretty. It's not a human-readable data format, but it's not necessarily secure either. Your question is ambiguous on whether or not this is required.</p> <p><strong>EDIT:</strong> I see you've added in a comment that you'd prefer to be able to encrypt your data. No problem. The accepted answer to this question suggests a way to do that in conjunction with binary serialization: <a href="https://stackoverflow.com/questions/4584135/how-to-encrypt-and-save-a-binary-stream-after-serialization-and-read-it-back">How to encrypt and save a binary stream after serialization and read it back?</a> Essentially, you'll want to use the <a href="http://msdn.microsoft.com/en-us/library/system.security.cryptography.cryptostream.aspx" rel="nofollow noreferrer"><code>CryptoStream</code> class</a> to handle the encryption/decryption. </p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload