473,394 Members | 1,893 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,394 software developers and data experts.

Inheriting XML comments

Hi,

When summary comments are placed above methods in an interface,
is it possible that these comments also correspond to the derived
classes i.e.

public myInterface
{
///<summary>
/// An inteface method that does something
///<summary>
void aMethod();

}

public myClass : myInterface
{
public void aMethod();
}
So someone using myClass would see the summary comments
for aMethod?

Perhaps I'm expecting too much from .NET ;)
Many thanks

Tristan.
Nov 15 '05 #1
1 1727

"Tristan" <tr************@yahoo.co.uk> wrote in message
news:7f**************************@posting.google.c om...
Hi,

When summary comments are placed above methods in an interface,
is it possible that these comments also correspond to the derived
classes i.e.

public myInterface
{
///<summary>
/// An inteface method that does something
///<summary>
void aMethod();

}

public myClass : myInterface
{
public void aMethod();
}
So someone using myClass would see the summary comments
for aMethod?
No, unless they are using myClass via myInterface. It is hoped that a future
version of visual studio(and perhaps the C# language itself) will provide
tools for additional automation. I'd like to see either direct copying to
the implementing source file(by keystroke or intellisense) or a template
approach. Imagine if you could apply a template tag to your docs such as
public interface myInterface
{
/// <summary>
/// An inteface method that does something
/// <summary>
/// <template>
/// <summary>
/// $target that does something
/// </summary>
/// <remarks>
/// This method implements myInterface.aMethod
/// </remarks>
/// </template>
void aMethod();
}
The end result would be something like

public myClass : myInterface
{

/// <summary>
/// aMethod that does something
/// </summary>
/// <remarks>
/// This method implements myInterface.aMethod
/// </remarks>
public void aMethod();
}

A post build tool could probably do it, using reflection and the xml classes
to edit the resultant file by either processing templates like suggested
above or manually copying entries in the output docs file. Its a tool
someone should write and one I've been considering, maybe I should...if no
one else has done it yet, that is, ;)
Perhaps I'm expecting too much from .NET ;)
Many thanks

Tristan.

Nov 15 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: Tim Haughton | last post by:
Open question - is it possible to inherit comments along with an interface or class?? For example - I have a class that implements IXPathNavigable. When VS creates te method stub for me, it...
11
by: Noah Coad [MVP .NET/C#] | last post by:
How do you make a member of a class mandatory to override with a _new_ definition? For example, when inheriting from System.Collections.CollectionBase, you are required to implement certain...
6
by: Russell Mangel | last post by:
Jeffery Richter makes the following statement in two books, the first was written in 2004, the latter in 2002. "You should not define new exception classes derived from ApplicationException; use...
4
by: Alan Silver | last post by:
Hello, I am displaying product details on a page and am allowing the site owner to specify the style in which the product details are displayed. I am debating which of two approaches to use here...
2
by: Jim Heavey | last post by:
I amd playing around with inheritance a little in VB.Net If I create a new class which inherits from ListViewItem and I am only wanting to override the ToString Method. In this situation, If I...
2
by: Charles Law | last post by:
I want a set of controls that all have a border, like a group box. I thought I would create a base control containing just a group box from which my set of controls could inherit. Assuming that...
3
by: Alex Satrapa | last post by:
There's some mention in the (old!) documentation that constraints such as foreign keys won't include data from inheriting tables, eg: CREATE TABLE foo ( id SERIAL PRIMARY KEY ); CREATE TABLE...
10
by: Brett Romero | last post by:
Say I have a class inheriting some base class: BaseClass { void Foo() { Update(); } }
17
by: Adrian Hawryluk | last post by:
Hi all, What is everyone's opinion of const inheriting? Should the object that a pointer is pointing at inherit the constness of the pointer? Such as in the case of a class having a pointer...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.