473,386 Members | 1,820 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,386 software developers and data experts.

XML Comments - Interfaces

Hi Guys,

I'm looking for a few opinions on what to put in XML Comments on
interfaces.

Firstly what do you think of including an exception element in the XML
comments for an interface method:

public interface IWhatever
{
# region Methods

/// <summary>
/// </summary>
/// <exception cref="ArgumentNullException">exception>
void MyMethod();

I quite like it, I know that we cant actually be sure that any classes
implement the interface will raise the exception but I like documenting
it in the interface anyway. Any thoughts?

Also in some cases when I'm implementing a class that supports the
interface above my comment for the MyMethod implementation would be
something like:

/// <summary>
/// Implements IWhatever.MyMethod.
/// </summary>
void MyMethod();

I've seen lots of code that does this and I quite like it but I've
never been sure what other people thought? Obviously this doesnt always
apply.

Ta,

Colin

Nov 22 '05 #1
1 1298
Oh and I should say, I realise the second point is a bit of a silly one
from the perspective of produces documents from the XML because that
already shows what interface method is being implemented.

Nov 22 '05 #2

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

Similar topics

5
by: Alex | last post by:
Hi all, We're looking at a vendor who uses the InterSystems Cache Database Platform, but our IT department has zero experience with this system. This software package will have a pivotal and...
72
by: Stephen Poley | last post by:
I have quite often (as have probably many of you) come across HTML forms with irritating bits of Javascript attached. The last straw on this particular camel's back was a large form I was asked to...
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...
1
by: colinjack | last post by:
Hi Guys, I'm looking for a few opinions on what to put in XML Comments on interfaces. Firstly what do you think of including an exception element in the XML comments for an interface method:...
1
by: baylor | last post by:
In C#, an interface cannot mark any method as static. i'm told the ILASM supports it but i've never tested that Two questions. First, why? OK, i've heard the reason about interfaces being...
35
by: michael.casey | last post by:
The purpose of this post is to obtain the communities opinion of the usefulness, efficiency, and most importantly the correctness of this small piece of code. I thank everyone in advance for your...
2
by: Ole Olsen | last post by:
Hi When writing code comments (to e.g. methods) in an Interface, this comments does not seem to be transferred to the implementing class? When ever instantiating a class implementing a...
30
by: Frank Rizzo | last post by:
We are having one of those religious debates at work: Interfaces vs Classes. My take is that Classes give you more flexibility. You can enforce a contract on the descendant classes by marking...
8
by: John | last post by:
What is the purpose / benefit of using an interface statement? It doesn't seem like anything more than a different way to make a class... (except you can't define any procedures in an interface...
22
by: RSH | last post by:
Hi, I have been reading on interfaces working on samples I've run across on the web. For the life of me I cannot seem to grasp them. It appears to me that interfaces are simply blueprints to...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
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
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
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: 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
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...

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.