VS Macro to insert TODO

Published 04 May 07 04:59 PM | john 

Here's another useful VS macro.  When I write code there are always weird edge cases that I think of while so I like to liberally sprinkle // TODO: comments around.  When you do this though you should always put in your alias and the date.  That way someone who comes across your comment knows who to ask for further details, or can determine that a two year old TODO isn't likely to be an issue anymore.

Sub InsertToDo()
  DTE.ActiveDocument.Selection.Text = "// TODO-" + Environment.UserName + "-" + DateTime.Now.ToShortDateString() + ": "
End Sub
Filed under: , , , , ,

Comments

# The Director of Random Technologies said on July 23, 2007 4:01 PM:

While I haven't been posting much here, I have been posting pretty regularly over on my main development

# Noticias externas said on July 23, 2007 5:02 PM:

While I haven't been posting much here, I have been posting pretty regularly over on my main development

Anonymous comments are disabled