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
33
votes
6 answers

How can I disable a specific warning for a C# project in VS2012?

I am trying to generate partial XML documentation during my build process for a C# project in VS2012. When I check the XML documentation file option in Project->Properties->Build, I get a build warning for each public member that lacks…
ChaseMedallion
  • 20,860
  • 17
  • 88
  • 152
32
votes
4 answers

auto-document exceptions on methods in C#/.NET

I would like some tool, preferably one that plugs into VS 2008/2010, that will go through my methods and add XML comments about the possible exceptions they can throw. I don't want the or other XML tags to be generated for me because I'll…
Sarah Vessels
  • 30,930
  • 33
  • 155
  • 222
31
votes
2 answers

C#, XmlDoc: How to reference method overloads

If I have these two methods public Foo Get(string bar) { ... } public Foo Get(int bar) { ... } And write this piece of xml documentation on a different method /// /// Has a close relation to the methods. ///…
Svish
  • 152,914
  • 173
  • 462
  • 620
30
votes
3 answers

Show xml tag into visual studio intellisense

I added the xml tag to some of my methods but I can't see its content in IntelliSense. Here is my code: /// /// we all live in a yellow summary /// /// what it returns public int MyMethod() { ....…
30
votes
2 answers

The purpose of using both and tags in Visual Studio XML documentation

I'm working in C# in VS 2012, adding XML documentation to my code, and I've accidentally turned on a StyleCop rule (SA1609, specifically), which "validates that a public or protected property contains a documentation header with a value…
Philip C
  • 1,819
  • 28
  • 50
30
votes
1 answer

Annotating Methods in Delphi?

I have a piece of code that needs some serious documenting and wanted to ask whether a feature similar to C#/.NET's In-code XML-Documentation is available for Embarcadero Delphi. My aim is to display some sort of information on how to use a specific…
FLClover
  • 524
  • 5
  • 13
29
votes
6 answers

How to document the structure of XML files

When it comes to documenting the structure of XML files... One of my co-workers does it in a Word table. Another pastes the elements into a Word document with comments like this:
joe
  • 16,988
  • 36
  • 94
  • 131
27
votes
4 answers

Using Markdown for source code documentation

I am looking for an alternative to C#'s XML source code documentation which introduced by the very nature of XML a lot of noise that is heavy on the eye and more work to write: /// /// This is text of importance. Linking to ///
chiccodoro
  • 14,407
  • 19
  • 87
  • 130
26
votes
4 answers

Documenting F# Code

In a C# class with a single constructor, I can add class summary XML documentation and constructor XML documentation: /// ///This class will solve all your problems /// public class Awesome { /// /// Initializes…
Akash
  • 2,311
  • 1
  • 20
  • 37
24
votes
6 answers

How to write comments / documentation for variables / fields / lists in VS 2010?

There is /// ///This is summary for some class or method /// documentation for classes or methods. But how to write this for simple variables or lists? I use Visual Studio 2010 and when i hover over some list, property or what…
Gero
  • 12,993
  • 25
  • 65
  • 106
24
votes
3 answers

How to make a cref to method overloads in a tag in C#?

I see in MSDN links such as "CompareOrdinal Overloads". How can I write such a link in C#? I tried: MyMethod Overloads But the compiler gives me a warning about being an ambiguous reference for the method which…
Hosam Aly
  • 41,555
  • 36
  • 141
  • 182
22
votes
2 answers

How to refer to enum constants in c# xml docs

I want to document the default value of an enum typed field: /// /// The default value is . /// public Orientation BoxOrientation; The compiler warns that it couldn't resolve the reference. …
Bruno Martinez
  • 2,850
  • 2
  • 39
  • 47
21
votes
7 answers

How do I export the code documentation in C# / VisualStudio 2008?

I have always made a point of writing nice code comments for classes and methods with the C# xml syntax. I always expected to easily be able to export them later on. Today I actually have to do so, but am having trouble finding out how. Is there…
Daren Thomas
  • 67,947
  • 40
  • 154
  • 200
20
votes
6 answers

Extract xml comments for public members only

I'm using xml comments to document public as well as internal and private members of my components. I would like to package the generated documentation xml files with component assemblies in order to enable "rich" (e.g. with method, exceptions and…
liggett78
  • 11,260
  • 2
  • 29
  • 29
19
votes
4 answers

How to use XML documentation files

When using an external assembly which comes with an XML documentation file, how do I get visual studio to find it? When having an XML documentation file, is there a program or xml transform file or something I can use to look at it in a nice way?…
Svish
  • 152,914
  • 173
  • 462
  • 620
1
2
3
26 27