So this is a follow-up to Keith Nicholas' question from 2 years ago:
Formatting Resharper backing fields for properties in C#
My guess is this would probably involve a custom Type Members Layout. Is there a way to to this yet in the latest Resharper version (as of now, it's 5.1) yet?
Version 9.1 has a new option:
Resharper > Options > Code Editing > Place backing field above property
https://youtrack.jetbrains.com/issue/RSRP-411980#comment=27-961304
In Resharper 6.1 I have this kind of a template, that may solve the question, or at least help others.
Using the 'shortuct' + TAB combination, I call mine nprop, and got further in adding a comment section.
private $TYPE$ _$NAMEP$;
/// <summary>
/// The $CLASS$ $NAMEC$
/// </summary>
public $TYPE$ $NAME$
{
get { return _$NAMEP$; }
set { _$NAMEP$ = value; }
}
Here's an image of the extra customisation to help rename things so it's just a matter of typing 2 values.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With