Is it possible to pin file names inside the app.config file and use them in your code?
For example, this code works fine:
string folder = @"C:\CDR_FTP1\ttfiles_exported\";
If I want to get the above value from app.config file
- Can this be done?
- What will be the syntax?
For example, inside app.config, I could try something like this:
<add key="InputDir" value=@ "D:\CDR_FTP1\ttfiles_exported\" />
I cannot add "@" because it will give me the following error:
"The character '@', hexadecimla value 0x40 is illegal at the beginning of an XML name."
If I try to use it in my code as shown below, that’s fine, but where and how will I need to stick with “@” so that the application can read it correctly?
string folder = ConfigurationSettings.AppSettings["InputDir"];
source share