When writing an XML documentation comment in a C# source file, do I need to replace "
with "
? This question discusses how to replace characters, but does not establish which characters need replacing, aside from establishing that angle brackets do need replacing.
No, just like normal XML, you only need to escape the quotes when they would otherwise have a special meaning. So if your XML documentation contains an attribute and you want a double quote in the attribute value, then you'd either use an attribute or use a single quote for the value start/end:
/// Foo <element attr="Bar"Baz" />
/// Foo <element attr='Bar"Baz' />
But it's very rare to need attribute values with quotes in within XML documentation, in my experience. They're almost always references to parameters, members, or list types.
See more on this question at Stackoverflow