Rename Related Symbols

I'm seeing an odd result when I renamed fields that have related property accessors. For example, let's say that I have a private field named prop and a property accessor named Prop. When I select to rename the field prop to _property to meet our internal standards, ReSharper prompts me to rename the property accessor from Prop to _property as well. I find this a bit odd because ReSharper seems to be recommending that I create a duplicate name in the same scope. It would be more logical to change the public property accessor to either _Property (still a bad choice) or Property (dropping the leading _).

2 comments
Comment actions Permalink

If you configure Resharper (under options) to specify the "_" as a field prefix, then it will drop the underscore from the proposed name.

Just FYI.

"Lothan" <lothan@newsguy.com> wrote in message news:e4pct2$pes$1@is.intellij.net...
I'm seeing an odd result when I renamed fields that have related property accessors. For example, let's say that I have a private field named prop and a property accessor named Prop. When I select to rename the field prop to _property to meet our internal standards, ReSharper prompts me to rename the property accessor from Prop to _property as well. I find this a bit odd because ReSharper seems to be recommending that I create a duplicate name in the same scope. It would be more logical to change the public property accessor to either _Property (still a bad choice) or Property (dropping the leading _).

0
Comment actions Permalink

Thanks, Paul. I completely overlooked that setting.

--


"Paul Bradshaw" <pbradshaw@advsol.com> wrote in message news:e4soh1$u29$1@is.intellij.net...
If you configure Resharper (under options) to specify the "_" as a field prefix, then it will drop the underscore from the proposed name.

Just FYI.

"Lothan" <lothan@newsguy.com> wrote in message news:e4pct2$pes$1@is.intellij.net...
I'm seeing an odd result when I renamed fields that have related property accessors. For example, let's say that I have a private field named prop and a property accessor named Prop. When I select to rename the field prop to _property to meet our internal standards, ReSharper prompts me to rename the property accessor from Prop to _property as well. I find this a bit odd because ReSharper seems to be recommending that I create a duplicate name in the same scope. It would be more logical to change the public property accessor to either _Property (still a bad choice) or Property (dropping the leading _).

0

Please sign in to leave a comment.