Questions tagged [xml-comments]

Can refer to 1) comments in XML documents or 2) XML markup used for documentation in programming language comments.

A comment in an XML document looks like this:

<!-- comment text -->

See https://www.w3.org/TR/xml/#sec-comments.


For information on the second meaning of this tag, see https://learn.microsoft.com/en-us/dotnet/csharp/language-reference/xmldoc/.

See also https://blog.submain.com/using-xml-comments/.

315 questions
20
votes
2 answers

Web.config: put an comment inside xml attributes

I want to put an comment in web.config file, something like this:
stacker
  • 14,641
  • 17
  • 46
  • 74
19
votes
4 answers

VS2010: Autogenerated files and XML documentation

This is really just re-asking this question asked about Visual Studio 2008. Does VS2010 offer any feature to get rid of the CS1591 compiler warning for auto-generated code? CS1591: Missing XML comment for publicly visible type or member To quote the…
19
votes
2 answers

How do I jump between XML doc comments in C#?

OK, this is a silly question, but when using Visual Studio, if I am writing XML doc comments in Visual Basic, I can use the tab key to switch between fields (e.g. Summary to Param to Returns). In C#, however, hitting the Tab key inserts a Tab, so I…
17
votes
3 answers

Using C#'s XML comment cref attribute with params syntax

In C#, I am trying to use to reference a method signature that contains the params keyword. I know this converts the parameter list to an array, but I can't even figure out how to refer to an array in a CREF attribute. I am…
Matt H
  • 7,311
  • 5
  • 45
  • 54
17
votes
2 answers

XML Comments not displaying in IntelliSense

I am trying to get VB.NET XML Comments to work with IntelliSense, and maybe it doesn't work the way I think it does. ''' ''' Gets or sets the Patient Code. ''' '''…
armsteadj1
16
votes
2 answers

How to make Visual Studio intellisense to show the remarks portion of XML comments?

When typing code, I really like the intellisense feature of Visual Studio 2010 (Professional), especially that I am able to look up XML comments of types in use. (See Documentation from Microsoft). This works so far. However, the remarks section of…
Marcel
  • 15,039
  • 20
  • 92
  • 150
15
votes
2 answers

Multiline XML Comments in VB.NET and Visual Studio Intellisense

I'm trying to put newlines in my XML Comments in VB.Net. I've read two other posts about C#, XML multiline comments in C# - what am I doing wrong? Adding line breaks to comments for Intellisense But the suggested or
tags don't work.…
Kratz
  • 4,280
  • 3
  • 32
  • 55
15
votes
1 answer

using see cref with < > characters in XML Documentation?

Possible Duplicate: How to reference generic classes and methods in xml documentation i have been using the see cref tag and it works great but now i need to include a generic list of string[] in the see cref but the documentation doesn't…
Martin
  • 23,844
  • 55
  • 201
  • 327
15
votes
6 answers

XML Commenting tips for C# programming

Good morning, afternoon, evening or night (depending on your timezone). This is just a general question about XML commenting within C#. I have never been very big into commenting my programs, I've always been more of a verbose…
user26901
14
votes
1 answer

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.…
user8190030
14
votes
1 answer

Reference TFS work item from code comment

In Visual Studio (2012+) I want a clickable reference from a code comment to a TFS work item. Is there a simple way to do this, and is this also possible from comments within the body of a function (not being the summary of the function)? So I want…
Michel van Engelen
  • 2,791
  • 2
  • 29
  • 45
14
votes
5 answers

Should you XML Comment on private methods?

So I use XML Comments in my code to help explain Public Methods and Public Members, another developer has mentioned that not all of my methods have XML Comments. I use the rule, if public or protected, add XML comment, if private, don't. Does this…
Rodders
  • 2,425
  • 2
  • 20
  • 34
13
votes
3 answers

Documentation comments for properties of positional records in C#

If I have a positional record like this: public record Version(int Major, int Minor); it seems that I can only provide a documentation, like this: /// /// Version record /// public record Version(int Major, int…
Danko Durbić
  • 7,077
  • 5
  • 34
  • 39
13
votes
3 answers

Should you write XML comments for Interfaces, concrete implementations, or both?

I am interested in where I should apply my XML comments. Should I put a more generic XML comment in the interface and a more descriptive one on the implementing class? Like this: public interface IObjectRepository { /// /// …
CatDadCode
  • 58,507
  • 61
  • 212
  • 318
13
votes
2 answers

Disable warnings for automatic generated code/folder/namespace

I like to have clean, "0 warnings" - projects in C#. This includes my project having XML comments for every public property and class. Now I use entity framework with migrations (code first). The migrations are created by using "Add-Migration" which…
Ole Albers
  • 8,715
  • 10
  • 73
  • 166
1
2
3
20 21