Visual Studio 2010 Snippets - Current Date

久未见 提交于 2019-12-13 13:49:54

问题


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:


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



来源:https://stackoverflow.com/questions/3469324/visual-studio-2010-snippets-current-date

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!