c++ cli - How to use user.config in c++ cli -


i tired of googling how use user.config instead of app.config in managed c++ application. found c# , can't figurate out how translate c++ (properties namespace not exist)

anybody can put me in way learn that? need know how create, read , write user.config file.

thank you

follow steps , work desired:

1 - add reference system.configuration

2 - add new item > visual c++ > utility > configuration file

3 - open app.config , add settings example:

<configuration>   <appsettings>     <add key="greeting" value="hallo world!" />   </appsettings> </configuration> 

4 - copy app.config output folder in post build event: goto project properties > configuration properties > build events > post-build events > command line , add this:

copy app.config "$(targetpath).config" 

5 - read settings:

string^ greeting = configurationmanager::appsettings["greeting"]; console::writeline(greeting); 

here's appconfigdemo project in c++/cli.


Comments

Popular posts from this blog

javascript - How to synchronize the Three.js and HTML/SVG coordinate systems (especially w.r.t. the y-axis)? -

javascript - How do I find how many occurences are there of a highlighted string, and which occurence is it? -

java - Reading data from multiple zip files and combining them to one -