In C# xml comments, what is the difference between the tags below?
1. <c>
2. <code>
In C# xml comments, what is the difference between the tags below?
1. <c>
2. <code>
<c>Your code sample.</c>
Indicates a short segment of code. You will use the c tag to draw attention to particular words, phrases or code in the resulting documentation. You will nest c tags within other tags.
<code>Your code sample.</code>
The code tag is similar to the tag, but it is intended to illustrate a true code usage example. The code tag is generally enclosed within an tag set (see below).
If you mean in code comments, then <code>
(generally used within <example>
) represents multiple lines of illustrative code, where-as <c>
represents just a single term to be written in a code font.
To use stackoverflow/markdown as a comparison, they are exactly the same as inline code
in the middle of a paragrah, vs
a multi-line
code sample that
appears formatted separately
Assuming you are talking about tags in xml comments,
c
is like back-ticks in StackOverflow, whilecode
is more like code blocks.