XML文档问题 [英] XML documentation question

查看:51
本文介绍了XML文档问题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

假设我有两种方法:

void BeginGroup();

void BeginGroup(string msg);


当我想引用它们时,我写了

///< see cref =" BeginGroup" />


但这会导致编译器警告,我的声明含糊不清

(2个BeginGroup方法之间)。

但是如果我想把它们两个都引用呢?

与点击Console.WriteLine时的方式相同然后你会去页面列出所有可能的多态变体?

Let say I have 2 methods:
void BeginGroup();
void BeginGroup(string msg);

when I want to refer to them I write
/// <see cref="BeginGroup"/>

But this cause a compiler warning, where my declaration is ambiguous
(between the 2 BeginGroup methods).
But what if I want to refer them both?
In much the same way as when you click on "Console.WriteLine" and you go to
the page which lists all the possible polymorphic variations?

推荐答案

你好Lloyd,


我想知道同样的事情,我不认为有任何/ doc支持

,它会做我们想要的,但文档标签,如看到,和

" summary"只是推荐的标签。您可以添加自己的HTML标记,并将

解析为适当的主题超链接,以便在构建文档时使用方法重载,但是您需要第三方工具或你将自己创建一个来进行解析。


以下内容可以作为参考标记使用

文档中的方法重载:


< overloads name =" BeginGroup" />


顺便说一句,我在MSDN上搜索了一个使用/ doc的方法,但我找不到它。

的页面"见" element明确指出它必须引用一个

的单个成员。如果您发现了什么,请告诉我们!


- Dave Sexton


" Lloyd Dupont" < net.galador@ld>在留言中写道

新闻:大江************** @ TK2MSFTNGP04.phx.gbl ...
Hi Lloyd,

I''ve wondered the same thing and I don''t think there is any "/doc" support
that will do what we want, however the documentation tags such as "see" and
"summary" are just recommended tags. You can add your own HTML markup and
parse it into the appropriate topic hyperlink for method overloads when
building the documentation but you''ll need a third-party tool or you''ll have
to create one yourself to do the parsing.

Something like the following could be used as the markup for referencing
method overloads in documentation:

<overloads name="BeginGroup" />

BTW, I searched MSDN for a way to do this using /doc but I couldn''t find it.
The page for the "see" element makes it clear that it must reference a
single member. If you find something please let us know!

- Dave Sexton

"Lloyd Dupont" <net.galador@ld> wrote in message
news:Oe**************@TK2MSFTNGP04.phx.gbl...
让我说我有2方法:
void BeginGroup();
void BeginGroup(string msg);

当我想引用它们时我写了
///< see cref =" BeginGroup" />

但这导致编译器警告,我的声明含糊不清
(在两个BeginGroup方法之间)。
但是,如果我想要将它们两者都引用?
与点击Console.WriteLine时的方式大致相同。你去了列出所有可能的多态变体的页面吗?
Let say I have 2 methods:
void BeginGroup();
void BeginGroup(string msg);

when I want to refer to them I write
/// <see cref="BeginGroup"/>

But this cause a compiler warning, where my declaration is ambiguous
(between the 2 BeginGroup methods).
But what if I want to refer them both?
In much the same way as when you click on "Console.WriteLine" and you go
to the page which lists all the possible polymorphic variations?



我认为你可以将参数添加到cref。


< see cref =" BeginGroup(string)" />


" Lloyd Dupont" < net.galador@ld>在留言中写道

新闻:大江************** @ TK2MSFTNGP04.phx.gbl ...
I think you can add the parameters to the cref.

<see cref="BeginGroup(string)"/>

"Lloyd Dupont" <net.galador@ld> wrote in message
news:Oe**************@TK2MSFTNGP04.phx.gbl...
让我说我有2方法:
void BeginGroup();
void BeginGroup(string msg);

当我想引用它们时我写了
///< see cref =" BeginGroup" />

但这导致编译器警告,我的声明含糊不清
(在两个BeginGroup方法之间)。
但是,如果我想要将它们两者都引用?
与点击Console.WriteLine时的方式大致相同。你去了列出所有可能的多态变体的页面吗?
Let say I have 2 methods:
void BeginGroup();
void BeginGroup(string msg);

when I want to refer to them I write
/// <see cref="BeginGroup"/>

But this cause a compiler warning, where my declaration is ambiguous
(between the 2 BeginGroup methods).
But what if I want to refer them both?
In much the same way as when you click on "Console.WriteLine" and you go
to the page which lists all the possible polymorphic variations?



你好Peter,


他想引用一组重载,而不是特定的签名。


Peter Rilling < PE *** @ nospam.rilling.net>在留言中写道

news:uP ************** @ TK2MSFTNGP02.phx.gbl ...
Hi Peter,

He wants to reference a group of overloads, not a particular signature.

"Peter Rilling" <pe***@nospam.rilling.net> wrote in message
news:uP**************@TK2MSFTNGP02.phx.gbl...
我想你可以添加cref的参数。

< see cref =" BeginGroup(string)" />

" Lloyd Dupont" < net.galador@ld>在消息中写道
新闻:大江************** @ TK2MSFTNGP04.phx.gbl ...
I think you can add the parameters to the cref.

<see cref="BeginGroup(string)"/>

"Lloyd Dupont" <net.galador@ld> wrote in message
news:Oe**************@TK2MSFTNGP04.phx.gbl...
让我说我有两种方法:
void BeginGroup();
void BeginGroup(string msg);

当我想引用它们时我写了
///< see cref =" BeginGroup" ; />

但这导致编译器警告,我的声明含糊不清
(在两个BeginGroup方法之间)。
但是,如果我想引用它们怎么办?
与点击Console.WriteLine时的方式大致相同。你去了列出所有可能的多态变体的页面吗?
Let say I have 2 methods:
void BeginGroup();
void BeginGroup(string msg);

when I want to refer to them I write
/// <see cref="BeginGroup"/>

But this cause a compiler warning, where my declaration is ambiguous
(between the 2 BeginGroup methods).
But what if I want to refer them both?
In much the same way as when you click on "Console.WriteLine" and you go
to the page which lists all the possible polymorphic variations?




这篇关于XML文档问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆