text: .
  For the registry, I decided to default to the old familiar path, HKEY_CURRENT_USER\Software\Company\Product, with individual sections appearing as subkeys of that. Again, this path is customizable when creating the object, or later via the
  RootKey and
  Name properties.:
  AMS.Profilenamespace inside your project.:
  Xmlor the
  Configclasses, their performance improves dramatically and approximates that of the Registry. However, buffering requires extra code to actually update the file.)
  Xmlclass which is meant to work with a separate file.
  Still trying to decide? Here's the bottom line.
  Configclass only if you absolutely need to write to the app.config file, or for your own file.
  Iniclass if your program works with legacy data stored in INI files.
  Registryclass if you don't want to deal with extra files, or if you require top performance.
  Xmlclass if you need to make it easy to transfer the whole app to another location, or to add an extra element of coolness to your app. ;-)xeproperty to the
  Profileclass to prevent the
  DefaultNamefrom raising an exception when
  Assembly.GetEntryAssembly()is
  null.
  Encodingproperty to the
  Configand
  Xmlproperties to allow changing of the default encoding (UTF8) for new files.
  XmlBasedclass to give the
  Xmland
  Configclasses a common base class for the new Buffering code.
  XmlBasedclasses (
  Configand
  Xml) to dramatically improve the performance of reads and writes to the underlying XML files. Thanks to all those who requested it and to brabchev for showing me his implementation.
  Encodingproperty and
  GetXmlDocumentmethod from the
  Xmland
  Configto their new
  XmlBasedclass.
  XmlBufferclass to encapsulate the new Buffering feature added to the
  XmlBasedclasses (
  Xmland
  Config).
  WritePrivateProfileStringin the
  Iniclass to raise a
  Win32Exceptionin case of failure.
  ProgramExe(
  protected) property from the
  Profileclass and replaced it with
  DefaultNameWithoutExtensionto retrieve the value to be used by
  DefaultNamewithout the profile-specific extension.
  DefaultNameof the file-based classes to use the new
  DefaultNameWithoutExtensionproperty and return the name based on the type of the application running (e.g., web.config for web apps). Thanks to Marcel Kunz for suggesting it.
  GetSubKeyin the
  Registryclass to open the keys more discriminately. Thanks to Kim Hellan for pointing this out (and for being patient).
  SetValueof
  Xmlto allow writing of empty strings. Thanks to Gary Montante for pointing this out.
  General
  News
  Question
  Answer
  Joke
  Rant
  Admin