开发者

Autogenerate code with shortcuts in Visual Studio?

开发者 https://www.devze.com 2023-01-22 17:28 出处:网络
I noticed that when you type ctor then hit the Tab button, VS will automatically create a constructor skeleton for you.

I noticed that when you type ctor then hit the Tab button, VS will automatically create a constructor skeleton for you.

I also saw in a screencast, the speaker could generate, among other things :Console.WriteLine, and also skeleton methods for all interface methods using keyboard shortcuts.

However, I couldn't get what keyw开发者_如何转开发ord he was typing.

What is this feature called? and where can I see the list of keywords and the effects?


I think Code Snippets is what you may be looking for.

Various options of how to invoke them, including via keyboard shortcuts are listed here

The above link just lists the default snippets that come with VS.

However you can also create and use your own snippets. Refer tutorials here for how to go about doing it


They're called Code Snippets:

  • http://msdn.microsoft.com/en-us/library/ms165392.aspx
  • http://devshaped.com/2009/01/accelerate-your-coding-with-code-snippets/
0

精彩评论

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