问题
Today one of my colleague showed me this trick in visual studio.
He types prop and hits tab twice
This makes the visual studio automatically expands that to a property.
No doubt, its a very cool feature.
But what is this trick called as ?
And is there any trick the same way i can type in method so that the IDE generates a method stub for me?
Thanks.
回答1:
The tricks you are referencing are called "code snippets" and are really useful for faster code writing. A complete list of default code snippets can be found here. Only the main method has currently a corresponding code snippet. There is also a tutorial for creating custom snippets.
来源:https://stackoverflow.com/questions/19024170/automatic-stub-generation-in-visual-studio-ide