An update to my previous post:
I have updated ClassFromConfig to automatically recognise value types.
Types that it can recognise:
  • Boolean
  • Integer
  • Double
  • DateTime
  • String array (String[])
I'm planning to add generation of connection string properties, e.g if you had
<connectionStrings>
<add name="MyConnection" connectionString="..."/>
</connectionStrings>
in your config, you could access it as follows:
Config.ConnectionStrings.MyConnection