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
Please sign in to leave a comment.
Hi Klaus,
Luedi wrote:
> Second, is there any way to generate the property method
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
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
Erwin Derksen wrote:
>> Our coding conventions forbid to use "this." and "base.".
you are right, but this is always obsolete.
Regards
Klaus
How do you call the base method in an overriden method without using the "base" keyword?
seems a strange policy to me.
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!"