Reversing Assignments

I was wondering if R# had a good way of reversing an assignment

For example:

Texbox_FirstName.Text = someclass.FirstName;
Texbox_LasttName.Text = someclass.LasttName;
Texbox_Address.Text = someclass.Address;

A line by line refactor function that allows me to flip the assignments, to the following

someclass.FirstName = Texbox_FirstName.Text;
someclass.LasttName = Texbox_LasttName.Text ;
someclass.Address = Texbox_Address.Text;

I end up doing ALOT in, I usually have the first one in my "page load" function, then the second on in my "save" function

1 comment
Comment actions Permalink

To swap assignment put cursor on your line and press 'Ctrl+Shift+Alt+Left arrow'.


Please sign in to leave a comment.