XML documentation problem

L

Lloyd Dupont

I have a class which kind of represent something akin to a node in a tree
like data structure.

I have some method like that:

class Element
{
IList<int> GetElementPath(); // get the path from the root

Element this[int index] { } // get children

Element this[IList<int> path] {} // descend the hierarchy with given
indexes
}

Now I try to add some XML comment to GetElementPath()

/// <returns>The path from the root to this element, to use with
/// <see cref="this[IList<T>]"/></returns>

That doesn't work...
And I have some problem to understand the XML documentation specification.

Could someone shed some light for me? Thanks! :D
 
K

Kevin Spencer

The '<' and '>' characters are illegal in XML. The convention in the Visual
Studio.Net XML documentation is to use curly brackets in their places, e.g.

<see cref="this[IList{T}]"/>

--
HTH,

Kevin Spencer
Microsoft MVP
Professional Chicken Salad Alchemist

I recycle.
I send everything back to the planet it came from.
 
L

Lloyd Dupont

Thanks Kevin!

In fact I was enable to find it by myself because there a documentation bug
I was missing.
It should not have been <see cref="this[IList{T}]"/> but <see
cref="this[IList{int}]"/>

Kevin Spencer said:
The '<' and '>' characters are illegal in XML. The convention in the
Visual Studio.Net XML documentation is to use curly brackets in their
places, e.g.

<see cref="this[IList{T}]"/>

--
HTH,

Kevin Spencer
Microsoft MVP
Professional Chicken Salad Alchemist

I recycle.
I send everything back to the planet it came from.

Lloyd Dupont said:
I have a class which kind of represent something akin to a node in a tree
like data structure.

I have some method like that:

class Element
{
IList<int> GetElementPath(); // get the path from the root

Element this[int index] { } // get children

Element this[IList<int> path] {} // descend the hierarchy with given
indexes
}

Now I try to add some XML comment to GetElementPath()

/// <returns>The path from the root to this element, to use with
/// <see cref="this[IList<T>]"/></returns>

That doesn't work...
And I have some problem to understand the XML documentation
specification.

Could someone shed some light for me? Thanks! :D
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top