VS2005 C#: is there a special visual-studio way to create properties or can the the code just be typed out?

StackOverflow https://stackoverflow.com/questions/2781129

문제

Using C# in VS2005, is there special way to create properties in the IDE or can you just type out the getters and setters?

도움이 되었습니까?

해결책

In the code editor type prop + Tab + Tab

다른 팁

Well, you can type the word prop and then hit tab twice for a code snippet. propg will generate a readonly property (only a getter).

I think what you're after are code snippets, have a look here and here.

There are also snippets besides prop for properties that you may save you time, see here for the list of built-in snippets.

There are built-in code snippets - try typing prop then pressing TAB twice. This will automatically generate the code for a property with a getter a setter, and let you tab between a couple of points to declare property name and type.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top