开发者

How can I reference the name of the file into which I'm inserting in my Code Snippet?

I'm writing a code snippet to insert a copyright header. The basic snippet is no problem. I'd like to be able to automatically reference the name of the file which I'm inserting the snippet in the text that is being inserted.

Any ideas how to do this?开发者_StackOverflow中文版


You can use the ClassName function demonstrated here. (Second example). If you need to add it outside the class scope, you could use Snippet Designer which is a plugin to make snippet creation easier.


Beside creating a snippet, you might consider creating a Template and putting the file name as a parameter (see MSDN).

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜