app.config:
<?xml version="1.0" encoding="utf-8" ?>
<configuration>
<appSettings >
<add key ="TemplateFilePath" value ="C:\Temp\Temp.xlsx"/>
</appSettings>
<system.diagnostics>
...
</system.diagnostics>
</configuration>
---------------------------------------------------------------------------------------------------
xxx.cs
Imports System.Configuration
Private fnex As String = ConfigurationManager.AppSettings("TemplateFilePath").ToString()
---------------------------------------------------------------------------------------------------
原文链接:https://www.f2er.com/vb/257166.html