Few professional C# programmers work without source control, and an 'author' or 'modified' tag is completely pointless if you use source control; therefore, there is no convention on this matter.
What is the convention C# developers use to indicate their authorship of a class?
-
29-07-2021 - |
Question
I read from a few places and learnt that there is no author tag in C# XML comments. But I'm sure it is common to come across situations where we have to use some ways to tell people that a particular class is written by who and who.
For myself, I am working on a project with several people and it is sometimes helpful to know who wrote a class, its last modified date, etc.
In Java, there is an @author
, @modified
, etc params for comments that will generate to the doc. I am new to C#. Since there is no author tag in the XML comment, what is the convention that C# developers use when they want to indicate that a certain class was written by them?
Solution
OTHER TIPS
VB in one of those rare occasions where it's better lets you create a file called VBAxmldoc.xml so you can actually customise the templates for each keyword. C# doesn't have this facility, you could if you've a real desire to do this and you don't have someone like me to get round, create a code snippet with doc comments in it e.g Author. for say creating a class and then use it.
I'd suggest using XML <remarks>
. Or you could do what most devs do and create a /* ... */
block at the top of the file.