I'm a professional game developer from Wakefield, England, working for TickTock Games.
I'm a married father of five and I am also the director and lead programmer of Retroburn Ltd.
Martin 'Bytrix' Caine
Father. C++ Games Programmer. Cyclist. Guitarist.
2013 3d alphalabs amazon apple archivirtual asynchronous battlefield bad company 2 ben 10 bepu beta blackmagic design blog blue marble bootcamp borderlands bsp calibration charity charvel childsplay comments competition content tracker counter-strike crash csgo css3 cycling dear esther deferred deus ex develop conference direct x discipline documentation doom 3 bfg dpi dr bott eidos elite force email deliverability eurogamer expo facebook focus fresnel game development game horizon game republic gamedev games gaming geoip girls make games global offensive grid guitar half-life 2 hawken hd7 hobbyist htc humble indie bundle imac indie indie trials indietrials intensity pro ip-countryside iron man 3 jamulus rift jquery kids kinect launch conference left 4 dead live lost mac mac osx manchester manhacks mass effect 2 matrox maya minecraft mirrors edge montreal morrowind movies museum of the microstar music mxo2 mini mysql nausea network networking nokia normal mapping obj oculus rift omnitrix ouya pedal for pounds php physics playstation suite port25 portal portal 2 positron posters powermta project aedra project euler promotion properties proton pulse ps vita ps4 psn racer reddit rendering retroburn game studios reviews rift racer riftracer roadkill roller coaster sdl2 shadow racers sharks shoct skyrifters snds space cadet spam trap star trek steam stencyl storage super stock sd1 fr superhot team fortress 2 tesselating tesselation texture editor thunderbird thunderclap ticktock games tiga track builder track bulder trials tv twitter uk ultimatrix usergroup vequencer video vireio visual assist visual studio vorpx voucher vr vr cinema war thunder warren web willow windows 8 windows 8.1 windows phone 7 workbench wp7 wp7dev xbla xblig xblig network xbox xbox live indie games xna xnaukug xperia play zombies on the holodeck
Email Deliverability
Tuesday, June 22nd 2010 / XNA

Documentation comments

The past few days I've been working through some of my engine and game code replacing my usual comments with documentation comments and I thought I'd make a quick post about it since it seems to be something very few people do.

Auto generated XML comment blockTo get started, simply find one of your own functions and type three slashes on the line above it. As if by magic, Visual Studio will add in an XML comment block where you can enter a description of the function's purpose and it's parameters. The snippet on the left shows an example of this, simply from pressing ///.

Brief but descriptive comments work bestSimply then fill in all of your details into the auto generated XML to enable the Visual Studio interface to show helpful hints while you're writing your code. Be sure to be nice and descriptive as this will come in handy in the future. In the shot to the left I've filled in the details for the function which is from a tower defense game I'm making.

Function usage in the auto-complete box Parameter usage when writing a function call

The two little snippets above show the hints Visual Studio will generate from your API comments. The first is a handy line of text telling you what the function does in the auto-complete box. The second describes what each parameter is for when you're calling the function.

If you found this post helpful please leave a comment below:
Tags:   comments   documentation   xna