title: Lightweight C# Persistent Key-value store?
body: <p>I'm building a small internal app that runs on webforms and need a lightweight way to store key/value pairs for settings. The keys and values would both be strings, the values being of unknown length and possibly containing formatting characters. What's the simplest thing that could possibly work for this? I had considered using SQL to store it, but that just seems silly. All I need are the following features:
  1) Be able to tell if a key exists
  2) Be able to retrieve a value by key
  3) Be able to set a value by key</p>
  
  <p>Really, I could get by with simply persisting a Dictionary to disk, but I'm not sure how to cleanly do it in a way that avoids issues with special characters (like carriage returns, commas, etc.).</p>
  
  <p>Anybody have a particularly lazy way to do this?</p>
  
  <p>Edit: The data items in question will be loaded into a property grid, not into individual winforms controls, so I don't think I'll be able to use the PropertyBinding infrastructure for this.</p>
  
  <p>Edit: I forgot to add that I'll need to be able to add brand new keys at runtime. The full set of keys won't be known at design time.</p>