Whole Tomato Software Forums
Whole Tomato Software Forums
Main Site | Profile | Register | Active Topics | Members | Search | FAQ
 All Forums
 Visual Assist
 Technical Support
 VA rename bug

You must be registered to post a reply.
Click here to register.

Screensize:
UserName:
Password:
Format: BoldItalicizeUnderlineStrikethrough Align leftCenterAlign right Insert horizontal ruleUpload and insert imageInsert hyperlinkInsert email addressInsert codeInsert quoted textInsert listInsert Emoji
   
Message:

Forum code is on.
Html is off.

 
Check to subscribe to this topic.
   

T O P I C    R E V I E W
Uniwares Posted - Apr 20 2020 : 05:22:32 AM
Its a bit of a grey zone but well, here it goes anyway:

When you have a C# class member called "value" (shouldnt be allowed anyway) AND you have properies in the same class, renaming the field to something else also renames the auto-parameter "value" of the properties.

class test
{
	private int value;
	public int Value { get { return this.value; }  set { this.value = value; } } 
}


When you change the name of value to _value, wait for the VA popupmenu showing, select "rename value to _value...", now all references + the value auto-parameter in the setter are renamed.

While this might not be a typical use case (actually it happened to me because intellisense renamed _value to value in the first place) it shows that VA errs in context when renaming.
1   L A T E S T    R E P L I E S    (Newest First)
feline Posted - Apr 20 2020 : 07:22:09 AM
I am seeing the same effect here. Thank you for the clear description.

case=142150

I am a little disturbed this is valid code, but I went back to VS2013 and it compiles quite happily.

© 2023 Whole Tomato Software, LLC Go To Top Of Page
Snitz Forums 2000