asp.net - How can I store application specific info in web.config such as number of threads to be run? -
itemprop = "text">
I have a module that uses multithreading. I want to store the number of threads created by the module in the web.config
file.
Which tags should I use?
Place it in the App Settings section.
& lt; App settings and gt; & Lt; Add Key = "myModuleThreadCount" value = "4" /> & Lt; / AppSettings & gt;
Then in your code, reference it as:
var thread = int.Parse (WebConfigurationManager.AppSettings ["myModuleThreadCount"]);
Comments
Post a Comment