Alternative to XML Documentation Comments in C#
NickName:user8190030 Ask DateTime:2019-02-03T04:49:25

Alternative to XML Documentation Comments in C#

When asking around for the conventions of documentation comments in C# code, the answer always leads to using XML comments. Microsoft recommends this approach themselves aswell. https://learn.microsoft.com/en-us/dotnet/csharp/programming-guide/xmldoc/recommended-tags-for-documentation-comments

/// <summary>
/// This is an XML comment.
/// </summary>
void Foo();

However, when inspecting Microsoft's code, such as ASP.NET Core, comments instead look like this.

//
// Summary:
//     A builder for Microsoft.AspNetCore.Hosting.IWebHost.
public interface IWebHostBuilder

Does the included doc generation tool work with this convention, or is there a documentation generation tool that uses this convention instead of XML? Why does Microsoft use this convention in their code instead of the XML comments they recommend themselves?

Copyright Notice:Content Author:「user8190030」,Reproduced under the CC 4.0 BY-SA copyright license with a link to the original source and this disclaimer.
Link to original article:https://stackoverflow.com/questions/54497385/alternative-to-xml-documentation-comments-in-c-sharp

More about “Alternative to XML Documentation Comments in C#” related questions

Alternative to XML Documentation Comments in C#

When asking around for the conventions of documentation comments in C# code, the answer always leads to using XML comments. Microsoft recommends this approach themselves aswell. https://learn.micro...

Show Detail

Is there a good alternative to xml documentation comments for C#?

I find the xml doc comments for C# or VB.NET very hard to read. Is there a decent alternative (that still provides the benefits of documenting code for intellisense, doc generation, etc.)?

Show Detail

API Documentation using XML Comments in SwaggerHub

I am trying to update API documentation for REST APIs. Currently, I have a C# Asp.net Web API code and Swashbuckle.AspNetCore. I am editing and adding XML comments in C# using Visual Studio to upda...

Show Detail

Use clang to extract documentation comments as XML

I've seen this presentation from 2012 on clang features to handle C++ documentation comments (eg. for doxygen). Slide 20 mentions a new feature to export comments as XML as being part of libclang. ...

Show Detail

How to add XML documentation comments to Xamarin iOS Bindings Library?

I am implementing Xamarin iOS Bindings Library to bind an Objective-C framework. I would like it to contain XML documentation comments if it's even possible. Is there any way to grab them from Obj...

Show Detail

Different colors in C# XML documentation comments

I'm trying to have different colors of text in the XML doc comment like how the word true, false and Window are in blue and green colors in the picture below. I tried decompiling the code that had...

Show Detail

How to generate doxygen documentation for xml files comments?

My current project is a C++ application. The documentation is generated with doxygen, and comments are formatted accordingly. The project also includes several xml resource files, with comments. I ...

Show Detail

How to read XML documentation comments using Roslyn

I would like to be able to read XML documentation comments while parsing C# source code using Roslyn. /// &lt;summary&gt; /// Documentation... /// &lt;/summary&gt; I tried setting the

Show Detail

Get XML Documentation Comments

/// &lt;summary&gt; /// This can have any description of the class /// &lt;/summary&gt; public class MyClass {} In the above code sample, is there any way I could get the summary Value. My

Show Detail

Get XML Documentation Comments

/// &lt;summary&gt; /// This can have any description of the class /// &lt;/summary&gt; public class MyClass {} In the above code sample, is there any way I could get the summary Value. My

Show Detail