views:

393

answers:

3

Hi

Other than using raw XML, is there an easy way in .NET to open and read a config file belonging to another assembly...? I don't need to write to it, just grab a couple of values from it.

Thanks

+1  A: 

Have you tried ConfigurationManager and OpenExeConfiguration(path)? (in System.Configuration.dll)

Marc Gravell
+2  A: 

Here's MSDN on OpenExeConfiguration.

And here's a shorter explanation of how to use it, including how to alter the file.

DOK
are you sure about that link to OpenExeConfiguration on MSDN?
DrG
Thanks, in spite. I've updated that link.
DOK
A: 

Thanks all for the quick answers

Matt
That's what we're here for.
DOK