Refactor, Encapsulate field - request

Hey, guys.

I'm not shure about it in formal standart, but i beleave -
most ppls used underline symbol as prefix for private
members. At least Microsoft think that.

I wanna ask you for little automations - when your
refactor encapsulate field, its possible to provide
default name for public member is w/o underline
symbol if private member prefixed with underline?

As i remember, defaul VS refactoring do it
by default.

thanx.
ivan.tsarevich


2 comments
Comment actions Permalink

Hello,

You can configure Resharper to use "_" as a prefix for member variables.
It will then no longer include this character when creating public names
based on member variables etc.

Kind regards,
Filip.

ivan.tsarevich schreef:

Hey, guys.

I'm not shure about it in formal standart, but i beleave -
most ppls used underline symbol as prefix for private
members. At least Microsoft think that.

I wanna ask you for little automations - when your
refactor encapsulate field, its possible to provide
default name for public member is w/o underline
symbol if private member prefixed with underline?

As i remember, defaul VS refactoring do it
by default.

thanx.
ivan.tsarevich

0
Comment actions Permalink

You can configure Resharper to use "_" as a prefix for member variables.
It will then no longer include this character when creating public names
based on member variables etc.
Filip.


But its not absolutely that i wanted....
Globally, i wanna ask R# team about two addition submenu in
refactoring:
"Quick encapsulate R" and "Quick encapsulate RW" without
any options. Its simple make public accessors from private
field. But its be possible only when inderline symbol is deafult
prefix for private members.
Thanx what i mean and wanna..

Thanx,
ivan.tsarevich.


0

Please sign in to leave a comment.