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

Troubles wtih comments in XmlSerialzier

I try to load a XML file with this code: XmlSerializer xmlSerializer = new XmlSerializer(typeof(MyObject)); StreamReader reader = new StreamReader(fileName); object myobject = xmlSerializer.Deserialize(reader); When the file contains a comment like…
Dav
  • 61
  • 1
  • 2
6
votes
2 answers

How to link / group overloads in C# XML comments?

In XML documentaiton comments for C#, is there a way to mark two or more functions to be overloads of each other, so that they reference each other automatically? Ideally, they'd also be grouped in the sandcastle-generated documentation…
peterchen
  • 40,917
  • 20
  • 104
  • 186
6
votes
1 answer

Doxygen documentation after members and XML commands

I am trying to get the best out of doxygen and IntelliSense, and found the XML commands to be a pretty good win here: documentation get generated on one hand, while it appears during completion on the other hand. One of the catches though, is the…
Julien Guertault
  • 1,324
  • 1
  • 15
  • 25
6
votes
5 answers

Why do I need to use these nasty comments in C# / .Net code?

I'm building application and one of requirements is to use a comments like this one: /// /// Creates new client. /// /// The URI. /// The param. /// I…
Roman Pushkin
  • 5,639
  • 3
  • 40
  • 58
6
votes
3 answers

Moving XML comments to a separate file

I love XML comments. However, with everything collapsed, every two lines looks like: [/// summary ...] public void CreateUser(string username, string password)[...] Multiply this by tens or hundreds of methods, and the resulting collapsed code is…
CptSupermrkt
  • 6,844
  • 12
  • 56
  • 87
6
votes
2 answers

Is it possible to wikify Visual Studio XML comments?

Is it possible to generate a set of wiki pages from XML comment file generated by Visual Studio? I'm talking about something like Sandcastle, but for wiki format instead of compiled CHM. Edit: I'm using MediaWiki which can import/export articles…
Dmitriy Zhukov
  • 372
  • 2
  • 12
6
votes
1 answer

Add different default and custom tags to Visual Studio XML Documentation

I am just learning how to use the XML documentation capabilities in visual studio and C#. The default XML tags used in the documentation are "summary", "param name", and "returns". I'd like to add "remarks" to the default tags. I'd also like to add…
5
votes
3 answers

XML Comments - MSDN Documentation "Note" section -- how do you duplicate this?

Basically, in the MSDN online help I often run into a "NOTE" section, but cannot for the life of me figure out how to get that same output. Apparently there is no tag. Does anyone know how to get this working? IDictionary(TKey, TValue) — In…
myermian
  • 31,823
  • 24
  • 123
  • 215
5
votes
4 answers

How to see full document generated by xml-comments

I have writen a method such as: /// /// A method having xml-comments /// This comment could be very long /// /// Input parameter /// Calculated value int CommmentedMethod(int input)…
Tu Tran
  • 1,957
  • 1
  • 27
  • 50
5
votes
1 answer

Visual Studio 2017: not showing correctly on hover (xml documentation)

If you hover over something (class, method,...) that's got xml documentation (///) in VS17 (15.6.2), you get this little popup that shows the comments properly formatted. I tried to make a list (copied from here): ///…
Neph
  • 1,823
  • 2
  • 31
  • 69
5
votes
0 answers

Is it possible to set the width of tooltips in Visual Studio Code Editor windows?

For just about all languages I program in, I am often annoyed by the width of the tooltips caused by XML auto-documentation comments. In some cases I started prepending each line with a , but then I have to filter them out again when…
Abel
  • 56,041
  • 24
  • 146
  • 247
5
votes
3 answers

How to use < > in Visual Studio comments?

Below comment is just a piece of xml comment in VS but my problem is characters like < > that break the xml structure. How can I use them in an xml comment? /// square index on board which 1<=index<=64
Freshblood
  • 6,285
  • 10
  • 59
  • 96
5
votes
0 answers

C# XML Documentation of methods in Abstract classes

I have a generic abstract base class that has some methods on it. Those methods have XML Comments on them as such: /// /// Controller for working with instances of {TModel} /// public abstract class BaseController :…
Jereme
  • 1,445
  • 1
  • 16
  • 32
5
votes
1 answer

warning CS1570: XML comment on 'myclass' has badly formed XML -- 'A name was started with an invalid character.'

I have some C# codes using doxygen comments for some equations. VS2013 should me a warning message warning CS1570: XML comment on 'myclass' has badly formed XML -- 'A name was started with an invalid character.' My comments are as follows and "<"…
Bangyou
  • 9,462
  • 16
  • 62
  • 94
5
votes
1 answer

How can I merge XML comments back into a .cs file?

Extracting comments out of C# class files is relatively easy (see Extracting doc comments from C# source file), but I've recently come into the opposite problem. My project has a bunch of classes that are generated from XML schema (via Microsoft's…
gcarvelli
  • 1,580
  • 1
  • 10
  • 15