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

Pergunta

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

Foi útil?

Solução

In the code editor type prop + Tab + Tab

Outras dicas

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.

Licenciado em: CC-BY-SA com atribuição
Não afiliado a StackOverflow
scroll top