c# - Visual Studio set command arguments -
i'm using visual studio 2013. now, have few c# , c++ projects in solution. under project properties can add debugging properties. works fine. when run visual studio solution on computer command arguments deleted.
how can define default command arguments available when run project on computer?
if using other computer debugging, instead of setting arguments in properties, set them via config
file.
let's following config file (by-default app.config
),
<?xml version="1.0" encoding="utf-8" ?> <configuration> <startup> <supportedruntime version="v4.0" sku=".netframework,version=v4.5" /> </startup> <appsettings> <add key ="key1" value ="sample" /> </appsettings> </configuration>
to value of key1
use configurationmanager.appsettings["key1"];
. can add multiple keys in <appsettings>
tag.
Comments
Post a Comment