I'm making a snippet for a file header in Visual Studio 2010. I want the date to match whenever the snippet was executed. Is this possible?
+1
A:
As far as I'm aware your not able to execute any code in a snippet, such as
DateTime.Now()
And there is no other way to do it. I've looked into this as I was trying to do something similar myself.
Sorry!
The alternative is as @AJM suggests to write a macro and assign it to a keyboard shortcut
mjmcloug
2010-08-12 16:08:51
Thats what I found out too :-( You can use DateTime.Now() in a macro then assign a keyboard shortcut..
AJM
2010-08-12 16:11:54
Yeah that's what I did
mjmcloug
2010-08-12 16:41:33