简体   繁体   中英

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?

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

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.

Yes. You can setup any snippet you wish. These are called "Live Templates" in Resharper, and have a lot more functionality than the VS versions. Just choose "Resharper->Live Templates.." in VS to edit them.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM