【发布时间】:2022-02-26 14:42:27
【问题描述】:
编写代码以从对象填充文本框后,例如:
txtFirstName.Text = customer.FirstName;
txtLastName.Text = customer.LastName;
txtAddress.Text = customer.Address;
txtCity.Text = customer.City;
在 Visual Studio(或什至像 Resharper 之类的东西)中有没有办法将此代码复制并粘贴到保存函数中,并将等号周围的代码反转,使其看起来像:
customer.FirstName = txtFirstName.Text;
customer.LastName = txtLastName.Text;
customer.Address = txtAddress.Text;
customer.City = txtCity.Text;
【问题讨论】:
-
另见我使用 AutoHotkey 脚本的方法stackoverflow.com/a/60452617/1265105
标签: c# visual-studio-2008