开发者

Including an @ in a c# configuration file

开发者 https://www.devze.com 2023-03-23 08:45 出处:网络
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

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.

0

精彩评论

暂无评论...
验证码 换一张
取 消