Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Where should the XML comments go? 1

Status
Not open for further replies.

adam0101

Programmer
Jun 25, 2002
1,952
US
I have an interface and a class that implements that interface. I want to include XML comments, but where should I put them? On the interface, the class that implements it, or both? Also, I want to include comments on the exceptions that will be thrown. Since those would depend on how the interface is implemented, should those comments only be in the class?

Are there any common standards for this?

Thanks,

Adam
 
In short the comments should be on both.

The interface should detail what someone that implements the interface may want to know and the class should details things specific to that implementation. So the exceptions should only go on the class. You may want to put something in the interface's remarks that says "Implementers should throw XxxException if Y happens.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top