cka*_*kal 27 c# visual-studio-2008
编写代码以填充对象中的文本框后,例如:
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)
Jon*_*eet 73
在VS2012之前:
{[a-zA-Z\.]*} = {[a-zA-Z\.]*};\2 = \1;使用.NET正则表达式的VS2012(可能是后来的):
([a-zA-Z\.]*) = ([a-zA-Z\.]*);${2} = ${1};.*选中(正则表达式)图标(替换文本框下的第三个)| 归档时间: |
|
| 查看次数: |
6680 次 |
| 最近记录: |