Posted By

manatlan on 09/14/09


Tagged

ironpython tech


Versions (?)

ironpython : create a ConfigurationManager


 / Published in: Python
 

  1. import clr
  2. clr.AddReference("System.Configuration")
  3. from System.Configuration import ConfigurationManager
  4.  
  5. ConfigurationManager.AppSettings.BaseClear()
  6. ConfigurationManager.AppSettings.BaseAdd("lang",ArrayList(["fr",]))
  7.  
  8. print ConfigurationManager.AppSettings["lang"] // -> fr

Report this snippet  

You need to login to post a comment.