C# Web.config配置

使用

<!--M002 バッチを起動のPath配置-->
<add key="BM0002_START_PATH" value="D:\BM0002\BM0002.exe"/>

键值对进行配置,

在程序中通过 string Path = System.Configuration.ConfigurationManager.AppSettings["BM0002_START_PATH"].ToString();  获得路径值D:\BM0002\BM0002.exe。

原文地址:https://www.cnblogs.com/xiaoxiaoshare/p/7160140.html