title: Is there any way to preserve white space in C# XML comments?
body: <p>I'm currently documenting my C# code and would find it useful to include a code block that directly shows how a piece of code should be called. I use the <code>&lt;code&gt;</code> tag that is embedded into the summary:</p>
  <p><a href="https://i.stack.imgur.com/RVqJc.png" rel="noreferrer"><img src="https://i.stack.imgur.com/RVqJc.png" alt="Code block embedded in C# XML comment summary" /></a></p>
  <p>While this works in general, I would like to preserve white space (line breaks, indentation). I tried the following so far:</p>
  <ul>
  <li>I applied the <code>xml:space=&quot;preserve&quot;</code> attribute to the <code>&lt;code&gt;</code> tag, but this had no effect at all.</li>
  <li>I used <code>&lt;br /&gt;</code> to indicate individual new lines (<a href="https://stackoverflow.com/a/57734549/1560623">this works as of VS 2019</a>), but I can't insert spaces or tabs. I tried to use <code>&amp;#x20;</code> (for space) and <code>&amp;#x9;</code> (for tab), but the popup wouldn't show those.</li>
  <li>I tried to use a <code>CDATA</code> section, but the code in between wasn't shown at all.</li>
  </ul>
  <p><a href="https://i.stack.imgur.com/l4nMW.png" rel="noreferrer"><img src="https://i.stack.imgur.com/l4nMW.png" alt="Br tags work, but space and tab are ignored by the parser" /></a></p>
  <p><strong>Is there any way to preserve white space in code tags of C# XML comments?</strong> Thank you for your help in advance.</p>