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

What XML comment tags are supported in the Object Browser

I'd like to provide a higher level of detail at the class level (in this case actually a Module) with code samples, etc., but I'm having trouble getting various tags to work. ''' ''' Here's a summary of SmallCodeChunk '''…
Jeff B
  • 8,572
  • 17
  • 61
  • 140
4
votes
2 answers

How to see XML comments of the code from Reflector

I prefer to browse the assemblies using reflector even though i have source code with me specially in case when i move to new project. But I feel it would be nice if i could see the XML comments of the source code in reflector. Is any addin which…
Uday
  • 819
  • 3
  • 12
  • 25
4
votes
3 answers

pyparsing - parse xml comment

I need to parse a file containing xml comments. Specifically it's a c# file using the MS /// convention. From this I'd need to pull out foobar, or /// foobar would be acceptable, too. (Note - this still doesn't work if you make the xml all on one…
some bits flipped
  • 2,592
  • 4
  • 27
  • 42
4
votes
1 answer

Is there an efficient way to handle repeating XML comments C# code in Visual Studio

I am using Visual Studio for a couple of years now and we have always just written all the XML comments for our C# code manually. But lately I recognize the need for a way to centrally maintain certain XML comments as they are repeated multiple…
Daniël Tulp
  • 1,745
  • 2
  • 22
  • 51
4
votes
1 answer

Is it possible to put all the xml-comments of a solution into one xml-file?

I have a Visual Studio C# solution with 3 different projects in it. In each of the projects I've commented all the code using xml-comments. If I want the comments build into xml, I have to specify a output file for each project. Is it possible to…
Bildsoe
  • 1,310
  • 6
  • 31
  • 44
4
votes
3 answers

XmlDocument reading XML Document comment Issue

I am using XmlDocument to parse xml file, but it seems that XmlDocument is always reading xml comments as a xml nodes: My C# code XmlDocument xml = new XmlDocument(); xml.Load(filename); foreach (XmlNode node in xml.FirstChild.ChildNodes)…
icn
  • 17,126
  • 39
  • 105
  • 141
4
votes
1 answer

XML Commenting -- How to properly mark a see also tag?

I have the following and I'm not sure how to properly reference this in my XML commenting: public static class FooExtensions { public static Nullable FooX(this Nullable foo) { ... } } public class Bar { /// /// Bar…
michael
  • 14,844
  • 28
  • 89
  • 177
4
votes
4 answers

How to comment strings of code in SOAP UI editor?

How to comment out strings of code in SOAP UI editor using shortkeys? I have SOAP UI 5.2.1.
Bilow Yuriy
  • 1,239
  • 3
  • 13
  • 20
4
votes
2 answers

A way to copy xml comments from a set of APIs to another similar set of APIs?

Suppose in Visual Studio I have a new project which contains some of the same APIs from an older project, and I would like to copy the xml documentation over to the new one. Is there a way I can do this without manually copy-pasting them one by one?
Dan7
  • 1,657
  • 1
  • 19
  • 31
4
votes
1 answer

C# XML comments - build a list

I am trying to build a list for my XML comments on my C# method. I am using the following document, however the list implementation in this does not work for me. I am using visual studio 2008 and .net…
Russell
  • 17,481
  • 23
  • 81
  • 125
4
votes
1 answer

Display XML comments generic params in Intellisence for static method

I'm having trouble getting the generic parameters for the two methods below to display the types in Intellisence. For the IEnumerable I just simply want it to show as double. And for the IDictionary overload, I want it to show…
HodlDwon
  • 1,131
  • 1
  • 13
  • 30
4
votes
3 answers

XML comment for method main?

In C# I have written an XML comment for the main method: /// /// Some comment. /// public static void Main(string[] args) { But Visual Studio warns me against it: XML comment is not placed on a valid language element main What…
Nicolas Raoul
  • 58,567
  • 58
  • 222
  • 373
4
votes
2 answers

Get .Net XML documentation to return specific type for Dictionary

I have a method like so: /// /// Gets a typed Dictionary of /// /// public Dictionary ToDictionary() When I invoke this method and…
Jon
  • 38,814
  • 81
  • 233
  • 382
4
votes
2 answers

What are XML Comments in C# Used For?

Possible Duplicate: What are the virtues of using XML comments in .NET? /// /// Set error message for multilingual language. /// What is the use of XML Comments like the above in C# and when do i use them.. XML Comments…
Raghavan
  • 637
  • 3
  • 12
4
votes
1 answer

How can the .NET source code XML comments be persisted in the assembly metadata?

Have you noticed that for some methods in the system assemblies, the .NET Reflector also shows the respective documentation? Which means that the documentation can be persisted in the assembly metadata. How can I make it work for my own assemblies?…
mark
  • 59,016
  • 79
  • 296
  • 580