Questions tagged [xml-comments]

Comments for program code that are written in XML.

280 questions
218
votes
5 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
  • 4,842
  • 4
  • 27
  • 55
142
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
  • 4,868
  • 8
  • 31
  • 36
129
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,511
  • 9
  • 36
  • 68
63
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
  • 766
  • 1
  • 5
  • 7
49
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
  • 58,815
  • 45
  • 146
  • 176
47
votes
2 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
  • 471
  • 1
  • 4
  • 3
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
  • 13,797
  • 12
  • 80
  • 140
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
  • 40,345
  • 11
  • 74
  • 107
27
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
  • 7,972
  • 4
  • 41
  • 61
26
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
  • 52,912
  • 28
  • 108
  • 161
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
  • 29,999
  • 21
  • 111
  • 199
21
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
  • 13,347
  • 6
  • 51
  • 62
20
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
  • 29,999
  • 21
  • 111
  • 199
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

Web.config: put an comment inside xml attributes

I want to put an comment in web.config file, something like this:
stacker
  • 13,651
  • 17
  • 43
  • 73
1
2 3
18 19