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
7
votes
2 answers

EPPLUS adding comment results error opening excel file

I would like to add comments at one cell, So.. I did: ... ExcelPackage package = new ExcelPackage(new MemoryStream()); var ws = package.WorkBook.WorkSheet[1]; ws.Cells[1, 1].AddComment("Lot Price: $12,000", ""); ... package.SaveAs(new…
Pan
  • 131
  • 2
  • 6
7
votes
1 answer

What is the "T:" for when used in a cref

What does the T: part mean in the use of the cref attribute here? and
Amal
  • 576
  • 1
  • 6
  • 26
7
votes
1 answer

XML Comments - Exceptions not showing in intellisense

I have a method that throws an exception under the namespace: MyApp.Domain. I have some of my custom exceptions under the namespace: MyApp.Domain.Exceptions. So what I have is this: using MyApp.Domain.Exceptions using System; namespace…
interesting-name-here
  • 1,851
  • 1
  • 20
  • 33
7
votes
1 answer

"Tag start is not closed" when commenting inside XML element's start and end tag

is the way to add comments in an XML file. Doesn't that actually means, that this part is not "compiled"? However, when I do something like this:
user3801167
  • 177
  • 1
  • 2
  • 7
7
votes
3 answers

Escape pointy brackets in C# XML comments

I'm writing a simple compare function with the following signature: /// /// Casts two unsigned integers to signed integers and compares them /// /// Left side of inequality ///
audiFanatic
  • 2,296
  • 8
  • 40
  • 56
7
votes
1 answer

How to document C# projects/assemblies with XML comments and Doxygen?

I have a C# code base with XML comments and (owing to this site) discovered that Doxygen can easily generate turn code and comments into HTML and PDF documentation So I know how to document classes and other types and their contents. But how to…
reinierpost
  • 8,425
  • 1
  • 38
  • 70
7
votes
1 answer

How do I add XML comments to the auto-generated classes produced by Entity Framework when using Model-First approach?

I have added information into the Documentation.Summary property in the graphical editor but that's not being added to the generated classes. Is there any way to do this?
Rob Church
  • 6,783
  • 3
  • 41
  • 46
7
votes
3 answers

Autogenerating XML comments in Vb.Net

I have recently moved over to coding from c#.net in vb.net In c# i could hit /// above any class/method and Visual Studio would automaticly generate the xml comments body for me. Example /// /// ///
Josef Van Zyl
  • 915
  • 3
  • 19
  • 43
6
votes
2 answers

Getting Intellisense on the interface that a method implements if that method does not have its own XML comments

In Visual Studio 2010 is there a way to get Intellisense on the Interface that a method implements if that method does not have any XML comments of its own? I suppose something like this would be fairly useful. I like to include XML comments with…
Peladao
  • 4,036
  • 1
  • 23
  • 43
6
votes
1 answer

constructed generic type in cref part of xml-comment

I have generic exception class like this: public class DuplicateException : Exception { public TEntity Entity { get; set; } } And I have non-generic method which might throw constructed generic exception: void Save() { throw new…
Snowbear
  • 16,924
  • 3
  • 43
  • 67
6
votes
3 answers

Class Documentation Suggestions

We are a Microsoft shop, concentrated on using C#. We have several projects, including websites, Windows services, and class libraries, that incorporate XML comments. I'm looking to generate MSDN-style HTML documentation for each project and deploy…
6
votes
1 answer

Sandcastle/SHFB. Add platform icons and version info to help file pages

I am building help file for my library using Sandcastle Help File Builder. The library has three versions (.NET, Silverlight and Windows Phone 7) built from the same code base. I would like to add platform icons next to method names and version…
Bobrovsky
  • 13,789
  • 19
  • 80
  • 130
6
votes
3 answers

How to auto linewrap comments in .NET?

I'd like to have a single command to auto-linewrap the XML-style comments in .NET. Example: /// /// This comment line should be /// on one line, and other lines in this block should be wordwrapped. /// I wouldn't mind…
Contango
  • 76,540
  • 58
  • 260
  • 305
6
votes
2 answers

XML Comments - How do you reference a dictionary indexer properly?

As the name states, I have no idea how to reference a dictionary indexer. Any help here? :) FYI, I've tried: //Highly doubted this would work.
myermian
  • 31,823
  • 24
  • 123
  • 215
6
votes
2 answers

XML Comments -- How (or where) do you create XML comments for your namespaces and library?

I understand that if you /// above a class, field, method, or property Visual Studio will start establishing XML-style comments for you. However, where can I go to add XML comments for my namespaces and/or library... For example: .NET Framework…
michael
  • 14,844
  • 28
  • 89
  • 177