CJ7
CJ7

Reputation: 23275

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

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

Upvotes: 1

Views: 375

Answers (4)

Graham Clark
Graham Clark

Reputation: 12966

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.

Upvotes: 1

Nick Craver
Nick Craver

Reputation: 630379

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.

Upvotes: 1

Darin Dimitrov
Darin Dimitrov

Reputation: 1038730

In the code editor type prop + Tab + Tab

Upvotes: 3

Dan Tao
Dan Tao

Reputation: 128317

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).

Upvotes: 2

Related Questions