Including an @ in a c# configuration file
I have some SQL queries in a configuration file. They are parameterized so have an @ in them. They will only be valid XML if they have that replaced with &
instead of @ but this will break the SQL. Is there an elegant way to avoid having to decode开发者_StackOverflow中文版 the string myself?
They will only be valid XML if they have that replaced with
&
instead of @
Nope. That is &
, @
is fine.
In any case, the XML parser will decode &
into &
when it reads the string. You should never have to do it manually.
精彩评论