When to use Constants vs. Config Files to maintain Configuration

Posted by CoffeeAddict on Programmers See other posts from Programmers or by CoffeeAddict
Published on 2011-11-23T06:16:52Z Indexed on 2011/11/23 10:09 UTC
Read the original article Hit count: 282

Filed under:
|

I often fight with myself on whether to put certain keys in my web.config or in a Constants.cs class or something like this.

For example if I wanted to store application specific keys for whatever the case may be..I could store it and grab it from my web config via custom keys or consume it by referencing a constant in my constants class.

When would you want to use Constants over config keys?

This question really applies to any language I think.

© Programmers or respective owner

Related posts about java

Related posts about .NET