I'm trying to write a little web.config reading class, and want it to be available for all .net framework solutions I am writing.
Everything is going fine, except for .net 1.1 and below I need to use System.configuration.configurationsettings.appsettings and for after 1.1 am using System.configuration.configurationmanager.appsettings.
This is a bit frustrating at the minute, and I want to figure out is there a way to do the following pseudo code
if environment.version.major < 2 then
use configurationsettings.appsettings
else
use configurationmanager.appsettings.
end if
I tried a little of using type.gettype to get around it, but I thought this must be such a simple fix, that someone else has a neat answer.