สร้างตัวแปร exeFilePath ให้เก็บ Path ของ Global Configuration File
' Get the application configuration file path.
Dim exeFilePath As String = System.IO.Path.Combine( _
Environment.CurrentDirectory, "MyGlobalConfiguration.exe.config")
กำหนดให้ Application Configuraiton file ใช้ Global Configuration แทน
' Map to the application configuration file.
Dim configFile As New ExeConfigurationFileMap()
configFile.ExeConfigFilename = exeFilePath
Dim config As Configuration = ConfigurationManager.OpenMappedExeConfiguration(configFile, ConfigurationUserLevel.None)