Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
I'm trying to do this:
ArticleTitle = ArticleTitle.Replace(" - ", "—");
To get a — to appear in front of the text. It doesn't work. And it appeared — What should I be doing here?
使用嵌入在字符串文字中的实际 Unicode 字符(根据正常的 C# 源代码规则) - 并让 XML API 处理它需要执行的任何转义或编码:
ArticleTitle = ArticleTitle.Replace(" - ", "\u8212");