Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Escape & character in string

I want to set value appconfig key,but value contains & character.I tried double && like this "8L&&L26X0s8@P" but dont working.Can you help me please?

 <add key="SAP_PASS" value="8L&L26X0s8@P"/>
like image 652
Fikret Savaş Avatar asked Mar 03 '26 18:03

Fikret Savaş


1 Answers

As app.config is xml file, use XML entities for this.

Specifically & is coded as &amp; (including the semicolon) in XML.

like image 193
Zbynek Vyskovsky - kvr000 Avatar answered Mar 06 '26 08:03

Zbynek Vyskovsky - kvr000