Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to show '<' char in C# XML comments?

Tags:

c#

xml

I searched a lot, but couldn't find how to show '<' char in C# XML comments?

like image 931
Mehdi Avatar asked Sep 12 '11 12:09

Mehdi


People also ask

Can you display a single character as a value in C?

yes, %c will print a single char: printf("%c", 'h'); also, putchar / putc will work too.

What is %s in C?

%s is for string %d is for decimal (or int) %c is for character.

How do you represent a character in C?

C uses char type to store characters and letters. However, the char type is integer type because underneath C stores integer numbers instead of characters. To represent characters, the computer has to map each integer with a corresponding character using a numerical code.

What is the \0 character in C?

'\0' is referred to as NULL character or NULL terminator It is the character equivalent of integer 0(zero) as it refers to nothing In C language it is generally used to mark an end of a string.


2 Answers

Did you try the normal XML escaping of &lt; - that should work, I believe:

/// <summary> /// Less than is &lt; /// Greater than is &gt; /// Ampersand is &amp; /// </summary> 

Basically it's normal XML.

like image 112
Jon Skeet Avatar answered Sep 21 '22 06:09

Jon Skeet


You need to escape it as in normal XML: with &lt; Same goes for &gt; for >

like image 21
Sebastian P.R. Gingter Avatar answered Sep 22 '22 06:09

Sebastian P.R. Gingter