Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

ReSharper Code Snippet for Auto-Property

Is there a way to create an auto property via code snippet using ReSharper? Like the prop for VS?

like image 268
PositiveGuy Avatar asked May 18 '26 09:05

PositiveGuy


2 Answers

Resharper 5 has a prop snippet which goes to auto-property. Does 4.5 not?

like image 96
pdr Avatar answered May 19 '26 21:05

pdr


You can create a Live Template

Just go to the Resharper menu, and choos Live Templates. Click the little green + icon and add this:

public $type$ $name$ { get; set; }

Then give the wanted shortcut, and you are good to go.

like image 45
Luhmann Avatar answered May 19 '26 22:05

Luhmann



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!