C# 获得Properties下的定义的资源

var  str1 = Properties.Resources.ResourceManager.GetObject("String1", null);

 

   string url = System.Configuration.ConfigurationManager.AppSettings["url"]; //获得配置文件下的值

<?xml version="1.0" encoding="utf-8" ?>
<configuration>
  <appSettings>
    <add key="url" value="http://123465/132.gz"/>
  </appSettings>
</configuration>

 

posted @ 2018-11-07 11:35  enych  阅读(3149)  评论(0编辑  收藏  举报