Snippets are a fast and intuitive way to write ripetitive code in your project.

Let’s try the prop snippet to write a property.

Write prop in the code:

snippet property 1

Press tab twice (only one time if Intellisense didn’t appears)

snippet property 2

The property stub magically appeared! Now let’s write the type of our variable, eg boolsnippet property 3

Let’s tab again to move to the variable name

snippet property 4

Note the variable type updated on the fly in the property definition.

Write the private variable name.

snippet property 5

Tab again, and write the property name.

snippet property 6

It’s time for a return to complete the property :)
snippet property 7


Se sei interessato a questo post, potresti anche provare a leggere:

  • No related posts