Quantcast
Channel: VBForums
Viewing all articles
Browse latest Browse all 42220

VS 2012 Should I always use xml comments?

$
0
0
Hi!

I need a second (or third) opinion about the xml comments you can add with ''' or /// in visual studio. Usually I just comment on stuff that needs explanation, and I always comment classes with some info about what it is for. But methods, properties etc only when absolutely needed.

Today, a guy at the company I work for stated that I have checked in some code that doesn't adhere to company guidelines (my second week here). I asked him whats the problem, and he said I forgot to add the xml comments on lots of properties, methods etc that generated lots of warnings in their build system. I told him, what if the method doesn't need commenting, because it is obvious what it does, then he said that I should put the xml comment there anyway but leave everything blank (just to get rid of the build warning)

Is this really the "correct" way to do it? I mean isn't it better to add comments when really needed? Or is there any difference between regular code comments and these xml comments? I come from a C++ background and there we do things differentlly...

kind regards
Henrik

Viewing all articles
Browse latest Browse all 42220

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>