Questions tagged [xml-documentation]

XML documentation is the way to generate automatic documentation from comments inside the code, to an XML formatted file that can be shown with any method, for e.g. a web page.

XML documentation are comments that form the documentation for C# programs. They are so called because they contain nested XML fragments. See Microsoft's XML Documentation Comments (C# Programming Guide) for more details.

391 questions
8
votes
2 answers

Documentation comments in C#: What are technical reasons to prefer /// or /**

Appendix A of the C# language specification deals with documentation comments and it states that there are two forms: single-line-doc-comment: /// input-charactersopt delimited-doc-comment: /** delimited-comment-textopt */ is…
Mishax
  • 4,442
  • 5
  • 39
  • 63
8
votes
3 answers

Is there already support for XML Documentation inside TypeScript?

Is there already support for XML Documentation inside TypeScript? It seems there isn't, but maybe I am overlooking something. I'd like something like this: export class Point { /// This is a Point class. constructor…
Peter Kiers
  • 602
  • 4
  • 16
7
votes
1 answer

Reference generic comment

I was wondering if it is possible to reference a dynamic generic class name in a comment and have it conditionally resolved in the IDE? Simple base class example: // // Retrieves all members from the database. // public void…
Alex
  • 75,813
  • 86
  • 255
  • 348
7
votes
1 answer

Code Contracts + Sandcastle -- Any way to customize the exceptions section?

I'm using Code Contracts ver: 1.4.40602.0 I copied the necessary Content and Transforms files Sandcastle outputs the exceptions based upon my contract requirements Example Code: public class MyClass { public MyClass(Object obj) { …
myermian
  • 31,823
  • 24
  • 123
  • 215
7
votes
4 answers

XML Documentation Comments with Interfaces and implementing class(es)

I am documenting an assembly using XML Documentation Comments, from which a chm file will be created using Sandcastle. My assembly contains various interfaces, each of which is implemented by one class (in my scenario these are WCF services). I have…
Richard Ev
  • 52,939
  • 59
  • 191
  • 278
7
votes
4 answers

Missing summary tags for explicitly implemented interfaces?

Basically, I have the following code: public class MyDictionary : IDictionary { /// My Summary void MyDictionary.ICollection> { ...…
myermian
  • 31,823
  • 24
  • 123
  • 215
7
votes
1 answer

DRY XML comments

When providing multiple overloads of the same method, I often have to repeat the description of the method, which violates DRY and increases maintenance cost: /// /// Frobnicates all foos read from the given reader. Frobnication is a ///…
Heinzi
  • 167,459
  • 57
  • 363
  • 519
7
votes
3 answers

Visual Studio Code - .net core - generate xml documentation

We are using Swagger UI documentation to describe our project API. Swagger have to read XML from projectname.xml to show all the C.R.U.D. functions we have in project. The problem is when I switch from Visual Studio to Visual Studio Code, it is not…
danigitman
  • 730
  • 8
  • 11
7
votes
3 answers

How to use inline comments to document members in .NET?

How can I document a member inline in .Net? Let me explain. Most tools that extract documentation from comments support some kind of inline documentation where you can add a brief after the member declaration. Something like: public static string…
Curro
  • 832
  • 2
  • 10
  • 14
7
votes
2 answers

How should comments for interface and class methods be different

I ran into this dilemma when working on an ASP.net web application using Web Client Software Factory(WCSF) in C#, and the same could apply to other platform and languages. My situation is like this: I am defining an IView interface for each web…
hongliang
  • 615
  • 4
  • 10
7
votes
1 answer

Are XML documentation tags not being handled by Web API 2 help pages?

I'm trying to use tags in my XML documentation tags for my API, but they are coming up blank in the Help pages. So, for a Description I'd like it to say: "Gets or sets the value for the associated Item." Where Item is a link to…
6
votes
1 answer

Separate documentation from code

I don't know if it's possible but I'm wondering if there is a way to keep the code and the documentation in separate files but still work the same as it does normally with inline documentation.
Yes Man
  • 411
  • 3
  • 15
6
votes
3 answers

Which comments documentation format is better for JavaScript?

Is there are any comments documentation format for JavaScript and processor for this format which generates HTML documentation? Currently I am using VSDoc xml comments for providing IntelliSense help at developing time, but as I know there is no…
6
votes
1 answer

XMLDoc for Delphi unit name

Is it possible to document unit purpose in Delphi using XMLDoc tag? How? I've tried put summary both before unit: /// Unit purpose: test unit Test; and after: unit Test; /// Unit purpose: test…
Serhii Kheilyk
  • 933
  • 1
  • 8
  • 24
6
votes
1 answer

Documenting using Sandcastle: Refering to enum value using

I'm using Sandcastle 2.4.10520 and Sandcastle Help File Builder 1.8.0 to generate a .chm help file. In my documentation, I'm using tags. If I try to refer an enum like it works perfectly. If I try to refer an enum…
brickner
  • 6,595
  • 3
  • 41
  • 54