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
243
votes
8 answers

Visual Studio Disabling Missing XML Comment Warning

I have a project with over 500 Missing XML Comment warnings. I know I can remove the XML Comment feature, or paste empty comment snippets everywhere, but I'd prefer a generic solution where I can make one change that disables all warnings of this…
Nivid Dholakia
  • 5,272
  • 4
  • 30
  • 55
156
votes
12 answers

How to have comments in IntelliSense for function in Visual Studio?

In Visual Studio and C#, when using a built in function such as ToString(), IntelliSense shows a yellow box explaining what it does. How can I have that for functions and properties I write?
Ali
  • 5,286
  • 9
  • 33
  • 36
137
votes
5 answers

How can I comment a single line in XML?

This rather is a verification just not to miss out. Is/n't there a line-comment in XML? So, one without a closer, like "//" the compiler uses. I saw How do I comment out a block of tags in XML? and several other discussions. This type of comment…
Roam
  • 4,831
  • 9
  • 43
  • 72
86
votes
3 answers

XML Auto Commenting C# in Visual Studio Code

In MonoDevelop, when I type "///", it auto-generates an xml-style comment like this: /// /// Describes the variable x /// int x = 0; Is there a way to get this behavior in Visual Studio Code?
s2Jakob
  • 861
  • 1
  • 6
  • 3
71
votes
4 answers

How do I comment attributes inside an XML tag?

Is it possible to comment one or several attributes inside an XML tag? Something like /* */ from C. I have tried using , but it was unsuccessful.
Ntropy Nameless
  • 846
  • 1
  • 6
  • 7
50
votes
5 answers

C# XML /// Comments, where does tag show up?

I am currently a programming student, and obviously my question is simple, but I haven't been able to find the answer to it online. So here it is: In XML /// comments in C#, where does the tag show up, I know that everything contained in…
Alex
  • 64,178
  • 48
  • 151
  • 180
30
votes
3 answers

XML multiline comments in C# - what am I doing wrong?

According to this article, it's possible to get multiline XML comments -- instead of using ///, use /** */. This is my interpretation of what multiline comments are, and what I want to have happen: /** * * this comment is on line 1 in…
Dave
  • 14,618
  • 13
  • 91
  • 145
29
votes
2 answers

What does the filterpriority tag in an XML comment do?

I have seen this in a lot of XML comments for classes in the .NET Framework BCL but have never been able to find documentation that explains what it does. As an example, looking at System.Object reveals the following comments: namespace System { …
Scott Dorman
  • 42,236
  • 12
  • 79
  • 110
28
votes
3 answers

Change default XML comment snippet in Visual Studio

When I hit /// in Visual Studio, is it possible to change the resulting snippet from this: /// /// /// to this?: ///
Daniel Schaffer
  • 56,753
  • 31
  • 116
  • 165
28
votes
3 answers

Can ConfigurationManager retain XML comments on Save()?

I've written a small utility that allows me to change a simple AppSetting for another application's App.config file, and then save the changes: //save a backup copy first. var cfg = ConfigurationManager.OpenExeConfiguration(pathToExeFile); …
Mike Atlas
  • 8,193
  • 4
  • 46
  • 62
24
votes
3 answers

XML Comments - Should see references be fully qualified?

Basically, when is it truly necessary (if at all) to use a fully qualified xml see reference: //Option 1 //Option 2 Also, what about referencing to the .NET Framework objects?
myermian
  • 31,823
  • 24
  • 123
  • 215
23
votes
1 answer

XML Commenting on partial classes/methods

Is there a standard way that the tools used to generate the API documents handle having XML Style comments on partial classes? Basically, how should one comment a partial class/method so that the resulting help documents aren't mangled? This…
myermian
  • 31,823
  • 24
  • 123
  • 215
23
votes
6 answers

At what point do Stylecop settings stop being useful and start becoming annoying?

I work in a team where we use extensive ruleset in StyleCop and I am wondering what are the thoughts on the general point where such a tool stops being useful and starts becomes annoying. We also use GhostDoc so code is riddled with XML comments…
Peter Kelly
  • 14,253
  • 6
  • 54
  • 63
21
votes
6 answers

.Net XML comment into API Documentation

Is there an easy way to produce MSDN-style documentation from the Visual Studio XML output? I'm not patient enough to set up a good xslt for it because I know I'm not the first person to cross this bridge. Also, I tried setting up sandcastle…
MojoFilter
  • 12,256
  • 14
  • 53
  • 61
21
votes
5 answers

What is the purpose of remarks tag in c#

I understand that remarks tag is used to provide additional information about the class but it is not displayed in intellisense while hovering / calling that class. I would like to know Where exactly it is useful?
Kalyani Ramamurthy
  • 378
  • 2
  • 3
  • 13
1
2 3
20 21