XML documentation comments are a special kind of comment, added above the definition of any user-defined type or member.
Once you enable GenerateDocumentationFile
(I did it from the IDE which added this GenerateDocumentationFile
element to my .cspoj file) you will need to inheritdoc
to derived classes. This is applicable when using a base class or interfaces.
The steps for VS 2017 was properties (from project) -> build -> output -> check XML documentation file
inheritdoc
Example:
1 | /// <summary> |
- https://docs.microsoft.com/en-us/dotnet/csharp/codedoc
- https://docs.microsoft.com/en-us/dotnet/csharp/programming-guide/xmldoc/inheritdoc
cref
The cref attribute in an XML documentation tag means “code reference.”
Link to some code:
1 | /// <summary> |
Its also helpful to link to exceptions, here the constructor links to the class FooValidationException
which is a validation execption.
1 | /// <summary> |