Using visual-studio: Use AppSettings in App.Config values as Values for other Sections on newest questions tagged visual-studio – Stack Overflow

How can I use values in appSettings as values for other sections/configurations in app.config. For example:

<appSettings>
     <add key="directory1" value="ParentFolder" />
     <add key="directory2" value="[directory1]/ChildFolder" />
     <add key="directory3" value="[directory2]/GrandChildFolder" />
</appSettings>

<runtime>
    <assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
        <probing privatePath="[directory1]" />
    </assemblyBinding>
</runtime>

I want to replace the keys enclosed with square brackets with the actual value from the appSettings. Thanks!

See Answers


source: http://stackoverflow.com/questions/11919111/use-appsettings-in-app-config-values-as-values-for-other-sections
Using visual-studio: using-visual-studio



online applications demo