Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Difference between c and code tags

In C# xml comments, what is the difference between the tags below?

1. <c> 
2. <code>
like image 823
Pankaj Avatar asked Jun 16 '26 14:06

Pankaj


1 Answers

Assuming you are talking about tags in xml comments, c is like back-ticks in StackOverflow, while code is more like code blocks.

/// <summary>
/// This is the <c>SomeMethod</c> method of the <c>Program</c> class.
/// </summary>
/// <param name="s">A string.</param>
/// <example>
/// You can use this method like this:
/// <code>
/// string x = SomeMethod("foobar");
/// Console.WriteLine(x);
/// </code>
/// </example>
static string SomeMethod(string s){
    throw new NotImplementedException();
} 
like image 128
Paolo Tedesco Avatar answered Jun 18 '26 05:06

Paolo Tedesco



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!