How to show '<' char in C# XML comments?
C#XmlC# Problem Overview
I searched a lot, but couldn't find how to show '<' char in C# XML comments?
C# Solutions
Solution 1 - C#
Did you try the normal XML escaping of <
- that should work, I believe:
/// <summary>
/// Less than is <
/// Greater than is >
/// Ampersand is &
/// </summary>
Basically it's normal XML.
Solution 2 - C#
You need to escape it as in normal XML: with <
Same goes for >
for >
Solution 3 - C#
You can use HTML escape codes, as mentioned in other answers, but you could also look at using the CDATA - (Unparsed) Character Data tag, here is a link with more info
Cheers
Solution 4 - C#
Would <
work?
Solution 5 - C#
As @Eris mentioned we could also use
<summary cref="C{T}">
instead of
<summary cref="C < T >">
for sake of delimiting a generic type