Strings in the appSettings section of the .config file

  • Thread starter Thread starter Roy Chastain
  • Start date Start date
R

Roy Chastain

I have
<add key="keyname" value="a string" />

I have that working just fine.

I would like to make the string value have embedded CR and LFs so that in my application I could just use the value of the key and have it
display correctly.

I have put \r\n into the string as in value="line 1\r\nline 2" but that does not appear to work.

What is the correct format?

Thanks
 
Well, the value is a string literal, so you'd put the newlines ringht in the value

<add key="keyname" value="this valu
has tw
newlines in it" />
 
Back
Top