Martin,
>Based on your programming experiences, which is better to make use of hard coding or using switches? From what I've noticed, hard coding is much lighter and requires less code since it is more direct. Switches on the other hand are more flexible and requires less maintenance.
>
>Any opinion on this?
Sure. You should never hard code anything that might at some point need configuration. This means usually connection strings, paths, or anything application specific that the user needs to set.
I use a configuration class for this sort of thing, so it's easy to set this up. You just create properties that you need and the class handles storing and retrieving the values.
I wrote most of this up here:
http://www.west-wind.com/presentations/configurationclass/configurationclass.aspIt's super easy to deal with and consistent across applications both in Web and WinForms apps...
Regards,
+++ Rick ---