Beorne <ma*******@gmail.comwrote:
Is there a generic Properties class in C# like java.util.properties?
I'd like some class that I can easily write and read from a a file and
that constains <unique_string,stringpairs to be used as a
configuration or parameters or properties file.
I'm working on Compact Framework so I can't use serialization (sob ...)
There isn't a built-in class as far as I'm aware, but it would be very
easy to write one - especially if you don't have many requirements
about escaping etc. I'd suggest making the file UTF-8 rather than
ISO-8859-1 as per Java, however - that way you only need to be able to
escape carriage return, line feed, space etc, rather than \uxxxx as
well.
--
Jon Skeet - <sk***@pobox.com>
http://www.pobox.com/~skeet Blog:
http://www.msmvps.com/jon.skeet
If replying to the group, please do not mail me too