Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

A way to link to a class,a method, especially a specific code line in C# comment

I want to build sort of documentation using links in code that point to a target. The target could be a Class or a Method or a specific code line. (pointing to a specific code line is the most important)
I thought of an extension for VS2010 or a specific comment tag.
Is there any way to make links of this kind ?

like image 990
HichemSeeSharp Avatar asked Oct 07 '12 16:10

HichemSeeSharp


1 Answers

Xml comment + sandcastle may be what you need. You can reference specified class or method using

<see cref=".."/>

and reference parameters using

<paramref name=".."/>

However, there is not direct method to reference certain lines of code but you can reference certain #region by using

<code source="$sourcefile$" region="$regionname$"/>

Please refer to: XML Comments Guide Page 20.

Note that the code you reference will be displayed directly in place rather than a link. It is not perfect, but I hope it helps.

like image 186
Liu Avatar answered Nov 14 '22 00:11

Liu