自动存根生成在Visual Studio IDE存根、Visual、IDE、Studio

2023-09-07 16:47:14 作者:嗟渔

今天我的一个同事给我看了这一招在Visual Studio。

Today one of my colleague showed me this trick in visual studio.

他类型道具和点击设置页两次

这使得Visual Studio会自动扩展,为一个属性。

This makes the visual studio automatically expands that to a property.

毫无疑问,它是一个非常酷的功能。

No doubt, its a very cool feature.

但什么是这招称为?

和有什么绝招同样的方式我可以键入方法使IDE生成一个方法存根给我吗?

And is there any trick the same way i can type in method so that the IDE generates a method stub for me?

感谢。

推荐答案

您引用被称为code段,并更快code写作非常有用的招数。默认code代码片段的完整列表,可以发现的此处。目前,只有主要方法有一个相应的code段。还有一个教程创建自定义代码段的。

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.