After writing code to populate textboxes from an object, such as:
txtFirstName.Text = customer.FirstName;
txtLastName.Text = customer.LastName;
txtAddress.Te
Before VS2012:
{[a-zA-Z\.]*} = {[a-zA-Z\.]*};\2 = \1;With VS2012 (and presumably later) which uses .NET regular expressions:
([a-zA-Z\.]*) = ([a-zA-Z\.]*);${2} = ${1};.* (regular expressions) icon is selected (the third one along under the replacement textbox)None that I know of. Of course, if you use one of the many binding approaches available, then you won't have to - the binding will do the update in both directions (including change via notifications).
So for winforms:
txtFirstName.DataBindings.Add("Text", customer, "FirstName");
etc
An option to get them in there that way in the first place with Resharper would be to define a live template similar to:
$uiElement$ = $dto$;
$dto$ = $uiElement$;
This will allow you to type them once and it will duplicate it for you and then you can cut and paste the save version to the other method.
I had the same need but I had to accept more characters than a-zA-Z\. in the solution provided by John so I slightly modified its regular exception like this :
Find what : {^[^\=]*} = {.*}
Replace with : \2 = \1
This will reverse anything arround the first equal sign found on a line