评论继承 [英] Comment Inheritance

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

问题描述

大家好,


这可能是一个愚蠢的问题,但是:

子类是否可以继承基类< summary> ;

重写方法的标签信息?


干杯,


T

解决方案

没有。前段时间我也问了这个问题!让

复制派生类的注释是非常令人沮丧的,并且随后保持它们同步的
。我希望在未来的C#版本中看到评论继承。


-

============== ========

Clive Dixon

Digita Ltd.( www.digita.com

< Tr *********** @ gmail.com>在消息中写道

新闻:11 ********************** @ i39g2000cwa.googlegr oups.com ...

大家好,

这可能是一个愚蠢的问题,但是:
子类是否可以继承基类< summary>
标记信息干嘛方法?

干杯,

T



谢谢Clive,

当我无法解决时,我质疑我的理智。好像

这是一件显而易见的事情!

T


2006年4月24日01:32:27 -0700, Tr *********** @ gmail.com 写道:

这可能是一个愚蠢的问题,但是:
子类是否可以继承基类< summary>
重写方法的标记信息?




C#和Visual Studio根本不允许这样做。但是,即将推出的

NDoc 2.0将允许评论继承。


但这将是一个仅限NDoc的功能所以你不是在IntelliSense中看到

继承的评论 - 这就是为什么我不打算使用该功能



-
http://www.kynosarges.de


Hi All,

This may be a silly question, but:
Is it possible for a child class to inherit a base classes <summary>
tag info for an overridden method?

Cheers,

T

解决方案

No. I also asked this question some time ago! It is very frustrating to have
to duplicate comments for derived classes, and also subsequently keep them
in synch. I would like to see comment inheritance in a future version of C#.

--
======================
Clive Dixon
Digita Ltd. (www.digita.com)
<Tr***********@gmail.com> wrote in message
news:11**********************@i39g2000cwa.googlegr oups.com...

Hi All,

This may be a silly question, but:
Is it possible for a child class to inherit a base classes <summary>
tag info for an overridden method?

Cheers,

T



Thanks Clive,
I was questioning my sanity when I couldn''t work it out. It seems like
such an obvious thing to need!
T


On 24 Apr 2006 01:32:27 -0700, Tr***********@gmail.com wrote:

This may be a silly question, but:
Is it possible for a child class to inherit a base classes <summary>
tag info for an overridden method?



C# and Visual Studio don''t allow that at all. However, the upcoming
NDoc 2.0 will allow comment inheritance.

But that''s going to be an NDoc-only feature so you''re not going to see
the inherited comment in IntelliSense -- which is why I''m not planning
to use that feature.
--
http://www.kynosarges.de


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

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