VS2005 C#: is there a special visual-studio way to create properties or can the the code just be typed out?
-
03-10-2019 - |
문제
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.