xml-documentation

Is there a way to use inline comments to document members in .NET?

Is there a way to document a member inline in .Net? Let me explain. Most tools that extract documentation from comments support some kind of inline documentation where you can add a brief after the member declaration. Something like: public static string MyField; /// <summary>Information about MyField.</summary> Is there a way to do t...

How to make a cref to method overloads in a <seealso> tag in C#?

I see in MSDN links such as "CompareOrdinal Overloads". How can I write such a link in C#? I tried: <seealso cref="MyMethod">MyMethod Overloads</seealso> But the compiler gives me a warning about being an ambiguous reference for the method which has other overloads. (Beginner question: do I actually need to write this tag to link to...

Open source tool to generate diagrams from XML Schema documents?

I'm looking for an open source tool to generate diagrams from XML Schema documents, similar to the Logical Model View in oXygen or the diagrams in XML Spy's Schema Editor. ...

XML Documentation: <see> tag with multiple generic type parameters

I'm trying to use XML documentation on the members of a class, and in a certain case I would like to reference a generic type using a tag. The problem here is that a warning is generated when multiple generic type parameters are specified. It was easy enough to find how to reference a generic type with a single parameter, as such: <see...

C#: How to reference generic classes and methods in xml documentation

When writing xml documentation you can use <see cref="something">something</see>, which works of course. But how do you reference a class or a method with generic types? public class FancyClass<T> { public string FancyMethod<K>(T value) { return "something fancy"; } } If I was going to write xml documentation somewhere, how would I...

How can I keep XML comments for method descriptions in a separate file ?

This question stems from this question Code documentation how much is too much? One the answers was to keep your xml documentation in a separate file. I really liked that answer as when I am looking through the code the verbosity of the documentation is annoying, on the other hand that verbosity is usefull when searching for the right ...

Extract xml comments for public members only

I'm using xml comments to document public as well as internal and private members of my components. I would like to package the generated documentation xml files with component assemblies in order to enable "rich" (e.g. with method, exceptions and parameter descriptions) Visual Studio Intellisense with the end product. The problem with i...

Make svcutil pick up documentation from C# files?

Folks, I'm creating a new WCF Service and started with my Service interface. Looks something like: public interface ISomethingService { /// <summary> /// some description /// </summary> /// <version>2.13.0</version> /// <copyright>2009 by myself</copyright> /// <author>Marc Scheune...

How to use XML documentation files

When using an external assembly which comes with an XML documentation file, how do I get visual studio to find it? When having an XML documentation file, is there a program or xml transform file or something I can use to look at it in a nice way? Not necessarily as complex as the msdn documentation viewer thingy, but at least something ...

C#, XML-Doc: Refering to a generic type of a generic type in C# XML documentation?

Writing some xml documentation for a predicate helper class. But I can't figure out I can refer to an Expression<Func<T, bool>> without getting a syntax error. Is it even possible? I have tried this: <see cref="Expression{Func{T, bool}}"/> But I get a red squiggly line under {T, bool}}. This works though: <see cref="Expression{TDeleg...

How do I reference a C# keyword in XML documentation?

Title says it all; <see cref="switch" />, for example, doesn't work - I get the compilation warning: XML comment on ... has syntactically incorrect cref attribute 'switch' Context for those who are interested... /// <summary>Provides base functionality for hand-coded abstractions of API method wrappers, mostly those that abstract ove...

Can implementation classes "inherit" XML comments from their implemented interfaces?

Curious question. I'm using Microsoft's Sandcastle to generate documentation from the XML comments in my C# code. Several of my classes are implementing interfaces which already have commented methods. I'd rather not duplicate the documentation in both the interface method and the public implemented method. Is there some kind of tag ...

XML Documentation Comments with Interfaces and implementing class(es)

I am documenting an assembly using XML Documentation Comments, from which a chm file will be created using Sandcastle. My assembly contains various interfaces, each of which is implemented by one class (in my scenario these are WCF services). I have added documentation to the interfaces, is there any way for me to automatically documen...

C#: How to refer to default(T) and constructors in xml comments

I have this class you see below in the answer. There I can refer to for example the Value with <see cref="Value"/>, and the class itself with <see cref="GenericEventArgs{T}"/>. How can I refer to default(T)? Is it even possible? How can I refer to the constructors? /// <summary> /// A simple <see cref="EventArgs"/> class that can c...

Reference Prefixes in .NET XML Documentation

I've been attempting to fully document all types, methods, properties, etc. of a class library using XML comments but have run into a curious effect involving the cref attribute (used by see tags for example). Going by the advice of this MSDN page as well as following various other examples on MSDN and other websites, it seems that whene...

C#: Xml-documentation for a namespace

Would you write xml-doc for a namespace? And if yes, how and where? I would think, if it is possible, maybe an almost empty file like this: /// <summary> /// This namespace contains stuff /// </summary> namespace Some.Namespace { } But will that work? Since you... "declare", or at least use the namespace in all the other files as we...

Ways to synchronize interface and implementation comments in C#

Are there automatic ways to sync comments between an interface and its implementation? I'm currently documenting them both and wouldn't like to manually keep them in sync. UPDATE: Consider this code: interface IFoo{ /// <summary> /// Commenting DoThis method /// </summary> void DoThis(); } class Foo : IFoo { public...

Reference generic comment

Hi, I was wondering if it is possible to reference a dynamic generic class name in a comment and have it conditionally resolved in the IDE? Simple base class example: // <summary> // Retrieves all <T> members from the database. // </summary> public void GetAll<T>() { //magic } If I now inherit from this class and happens to be clas...

How to get Emacs fill-paragraph to work on inline XML code doc in my C# modules?

This question is similar to Getting Emacs fill-paragraph to play nice with javadoc-like comments, but for C#. I have comments like this: /// <summary> /// Of these Colonies, and ought to fall themselves by sending a /// constant state of THE unanimous /// Declaration OF Nature and donations are legally 1.E.1. /// </summary> /// /// <...

How can I prevent Visual Studio from locking the xml documentation files in the bin directory?

My visual studio solution includes a web application and a unit test application. My web application uses log4net. I want to be able to use msbuild from the command-line to build my solution. However, whenever I build the solution from the command-line, I get build errors because it can't copy log4net.xml to the test project's bin direct...