编写代码以填充对象中的文本框后,例如:
txtFirstName.Text = customer.FirstName;
txtLastName.Text = customer.LastName;
txtAddress.Text = customer.Address;
txtCity.Text = customer.City;
Run Code Online (Sandbox Code Playgroud)
有没有办法在Visual Studio(甚至像Resharper)中将此代码复制并粘贴到保存函数中并反转等号周围的代码,以便它看起来像:
customer.FirstName = txtFirstName.Text;
customer.LastName = txtLastName.Text;
customer.Address = txtAddress.Text;
customer.City = txtCity.Text;
Run Code Online (Sandbox Code Playgroud)