是否可以在XML文档中包含一个到网站的链接?例如,我的方法总结为
///<Summary>
/// This is a math function I found HERE.
///</Summary>
public void SomeMathThing(Double[] doubleArray)
{
...
}
当我输入
SomeMathThing(
我想智能感知显示的摘要选项点击“这里”链接到一个外部网站。这可能吗?怎么做呢?
是否可以在XML文档中包含一个到网站的链接?例如,我的方法总结为
///<Summary>
/// This is a math function I found HERE.
///</Summary>
public void SomeMathThing(Double[] doubleArray)
{
...
}
当我输入
SomeMathThing(
我想智能感知显示的摘要选项点击“这里”链接到一个外部网站。这可能吗?怎么做呢?
当前回答
Try:
///<Summary>
/// This is a math function I found <see href="http://stackoverflow.com">HERE</see>
///</Summary>
其他回答
你可以使用标准的HTML语法:
<a href="http://stackoverflow.com">here</a>
文本将在Visual Studio中显示。
使用<a>标记。例如,我在我的项目中使用了这个解决方案:
结果:
我的XML代码:
/// <summary>
/// This is C# XML Documentation Website Link
/// <a href="https://stackoverflow.com/questions/6960426/c-sharp-xml-documentation-website-link">See more</a>
/// </summary>
或者使用<see>标签。结果与<a>标签相同。
/// <summary>
/// This is C# XML Documentation Website Link
/// <see href="https://stackoverflow.com/questions/6960426/c-sharp-xml-documentation-website-link">See more</see>
/// </summary>
我也试过<见href="https://some.com/>第一次,它没有工作;然而,我尝试了<seealso href="https://some。Url /">,它确实工作了。
你可以在cref中包含一个!:前缀,让它在生成的Xml文档中不受影响地传递,这样像Innovasys Document!X和Sandcastle将使用它。如。
/// <summary>
/// This is a math function I found <see cref="!:http://stackoverflow.com">HERE</see>
/// </summary>
Visual Studio智能感知不会将其显示为智能感知的链接——这没什么意义,因为它是一个工具提示,所以你不能点击它。
Try:
///<Summary>
/// This is a math function I found <see href="http://stackoverflow.com">HERE</see>
///</Summary>