I wrote a single-file INI parser/editor for .NET that preserves formatting using regex instead of dictionaries with JSON support. I've been experimenting with a different approach to editing INI files in C#. Most libraries parse the file into dictionaries or objects and then regenerate the entire file when saving. That works well for configuration data, but it usually destroys comments, blank lines, indentation, entry order, or duplicate keys. Instead, I treat the INI file as plain text...