Generating properties

Hi,

i'm using R# Build 251 for Visual Studio 2003. If i generate property methods for my member variables, the member variables are
prefixed with "this." inside the property method body. Our coding conventions forbid to use "this." and "base.". First, even if i
set "Redundant 'this' qualifier" to "Show as warning" in the Highlighting options R# shows no warning. Second, is there any way to
generate the property method without the "this." qualifier ?

Regards
Klaus

0
5 comments
Avatar
Permanently deleted user


Hi Klaus,

Luedi wrote:
> Second, is there any way to generate the property method

without the "this." qualifier ?


Go to Resharper -> Options -> Code Style -> C# -> Other. There is an
option at the bottom of the page that should be responsible for this
behavior: "Force this. qualifier for instance members"

Ciao,
Jens

0
Avatar
Permanently deleted user

Our coding conventions forbid to use "this." and "base.".


Well, there are situations in which the use of base DOES alter the
semantics. Example: calling a virtual property in a constructor. I hope for
you that this "forbidding" takes this into account...

Regards,
Erwin


0
Avatar
Permanently deleted user

Erwin Derksen wrote:
>> Our coding conventions forbid to use "this." and "base.".


Well, there are situations in which the use of base DOES alter the
semantics. Example: calling a virtual property in a constructor. I hope for
you that this "forbidding" takes this into account...


you are right, but this is always obsolete.

Regards
Klaus

0
Avatar
Permanently deleted user

How do you call the base method in an overriden method without using the "base" keyword?

seems a strange policy to me.

0
Avatar
Permanently deleted user

Klaus,

I could not reproduce such behavior. Could you please post a small code example
with generated properties?

Valentin Kipiatkov
Chief Scientist, Vice President of Product Development
JetBrains, Inc
http://www.jetbrains.com
"Develop with pleasure!"

Hi,

i'm using R# Build 251 for Visual Studio 2003. If i generate property
methods for my member variables, the member variables are prefixed
with "this." inside the property method body. Our coding conventions
forbid to use "this." and "base.". First, even if i set "Redundant
'this' qualifier" to "Show as warning" in the Highlighting options R#
shows no warning. Second, is there any way to generate the property
method without the "this." qualifier ?

Regards
Klaus



0

Please sign in to leave a comment.