C # xml file comment for link to file

Is there a tag for linking to a file in an xml code comment? The file is a sql script file. Just wondering if there is a better way than something like this.

///<summary> ///please have a look at c:\code\project1\sql\file1.sql ///</summary> 
+4
source share
4 answers

You can use the file URI, which makes it clickable in the visual studio:

 file:///c:/code/project1/sql/file1.sql 
+4
source

You can mix elements from other namespaces, including xhtml, so

 ///<summary> ///please have a look at <a href="file:///c:/code/project1/sql/file1.sql">file:///c:/code/project1/sql/file1.sql</a>. ///</summary> 

Allowed, although whether it uses itself well or not, depends on what you use to turn XML into something more readable. Using a tooltip, at least in my IDE, ignores the tag and displays the text inside (which is exactly what I would like to get in the tooltip).

Of course, this is not very convenient to use on a machine that does not have the correct c: \ code \ project1 \ sql \ file1.sql

+6
source

The most commonly used tags are listed at http://msdn.microsoft.com/en-us/library/5ast78ax(v=vs.71).aspx . It also mentions that it will process "any tag that is valid XML", so you are not limited to them.

+1
source

There are things like a special tag for referencing a file in XML. It is a metalanguage without such restrictions.

0
source

Source: https://habr.com/ru/post/1344909/


All Articles