App.Config文件如下:
<pre name="code" class="html">
<?xml version="1.0"?>
<configuration>
<configSections>
</configSections>
<appSettings>
<add key="Version" value="V1.0.001"/>
</appSettings>
<startup><supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.5"/></startup></configuration><pre name="code" class="csharp">
private void Init()
{
string node = "Version";
this.labVersion.Text = ConfigurationManager.AppSettings[node].ToString();
}