配置文件参数引用

  • 引用:  
  readonly IPostService postService = ServiceFactory.CreatePostService(System.Configuration.ConfigurationManager.AppSettings["UA_Service"], null);

  Yatsoon.Common.Global.GetConfig().GetValue("UnAu.DeptTreeViewCode");
  • 配置文件:
  • <?xml version="1.0" encoding="utf-8"?>
    
    <configuration>
    
      <appSettings>
    
        <add key="UA_Service" value="http://testserver3:3300/WebService/LoginService.asmx" />
    
      </appSettings> 
    
    </configuration>
    
     

     

 

posted @ 2016-01-28 13:39  jacketlin  阅读(277)  评论(0)    收藏  举报