Comment Inheritance

  • Thread starter Thread starter Tris.Phillips
  • Start date Start date
T

Tris.Phillips

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#.
 
Thanks Clive,
I was questioning my sanity when I couldn't work it out. It seems like
such an obvious thing to need!
T
 
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.
 
I did put in a request for this feature with the NDoc guys - glad to hear
it's actually happening. Would be nice to see this ability in the C#
compiler too...
 
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.

You can use GhostDoc, which "fills in" the summary from the overridden
method.

http://www.roland-weigelt.de/ghostdoc/

It's pretty useful for filling in other summaries as well.

// Bjorn A
 
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?

Yes, use Ghostdoc.
http://www.roland-weigelt.de/ghostdoc/

:)

Frans

--
------------------------------------------------------------------------
Lead developer of LLBLGen Pro, the productive O/R mapper for .NET
LLBLGen Pro website: http://www.llblgen.com
My .NET blog: http://weblogs.asp.net/fbouma
Microsoft MVP (C#)
------------------------------------------------------------------------
 
It doesn't support VS Express

The other way round... VS Express doesn't support plug-ins.
Any plug-ins. Microsoft very much wants you to buy Standard or higher
if you wish to use plug-ins...
 
Back
Top