App.config文件如下:

<?xml version="1.0" encoding="utf-8" ?>
<configuration>
  <configSections>
    <section name="HandlerFolders" type="System.Configuration.DictionarySectionHandler"/>
  </configSections>
  <!--待处理的文件目录-->
  <HandlerFolders>
    <add key="Folder1" value="F:\test\batchReplaceImg\htmltemp\"/>
    <add key="Folder2" value="f:\test\css"/>
    <add key="Folder3" value="f:\test\js"/>
  </HandlerFolders>

</configuration>

 

获取配置内容

public static IDictionary GetHandleFolders()
        {
            IDictionary folders = (IDictionary)ConfigurationManager.GetSection("HandlerFolders");
            return folders;
        }

相关文章:

  • 2022-01-28
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-02-04
  • 2022-12-23
  • 2022-12-23
猜你喜欢
  • 2021-10-03
  • 2021-11-30
  • 2021-07-10
  • 2022-12-23
  • 2021-05-19
  • 2022-01-07
相关资源
相似解决方案