Whole Tomato Software Forums
Whole Tomato Software Forums
Main Site | Profile | Register | Active Topics | Members | Search | FAQ
User name:
Password:
Save Password
Forgot your password?

 All Forums
 Visual Assist
 Technical Support
 VA rename bug
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

Uniwares
Tomato Guru

Portugal
2320 Posts

Posted - Apr 20 2020 :  05:22:32 AM  Show Profile  Reply with Quote
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.

feline
Whole Tomato Software

United Kingdom
18749 Posts

Posted - Apr 20 2020 :  07:22:09 AM  Show Profile  Reply with Quote
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.

zen is the art of being at one with the two'ness
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Reply to Topic
 Printer Friendly
Jump To:
© 2023 Whole Tomato Software, LLC Go To Top Of Page
Snitz Forums 2000