Click here to Skip to main content
15,900,108 members

Comments by Member 15251555 (Top 22 by date)

Member 15251555 10-Jul-23 6:02am View    
I think that I have created custom section right but maybe I have a problem with calling in code..
Member 15251555 29-Jun-23 8:13am View    
I have one question. I have a lot of keys in config file, how can I read all keys and use it in start process?
e.g.:
<add key="mlcmd" value="C:\Users\cen65842\Documents\SCServer_mlcmd\mlcmd.exe">
<add key="switch_app" value="xyz">
<add key="rut_messagesrv_p" value="abx">
<add key="rut_ors_p" value="abb">
...



Here is my code:
Process.Start(mlcmd, switch_app + rut_messagesrv_p);
Process.Start(mlcmd,switch_app + rut_ors_p);
.etc
.
.
I dont want declare all keys in single row but as complex, now I have:
string mlcmd = ConfigurationManager.AppSettings["mlcmd"];
string switch_app = ConfigurationManager.AppSettings["switch_app"];
string rut_messagesrv_p = ConfigurationManager.AppSettings["rut_messagesrv_p"];
string rut_ors_p = ConfigurationManager.AppSettings["rut_ors_p"];
Member 15251555 29-Jun-23 8:01am View    
thank you Griff.
Member 15251555 22-Sep-22 7:28am View    
Hi Richard, I tried this code - working well, thank you.
Member 15251555 22-Sep-22 5:10am View    
Griff, I edited it what do you think, is it correct?