Whole Tomato Software Forums
Whole Tomato Software Forums
Main Site | Profile | Register | Active Topics | Members | Search | FAQ
User name:
Password:
Save Password
Forgot your password?

 All Forums
 Visual Assist
 Feature Requests
 Switch Equals
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

MiddleTommy
Junior Member

14 Posts

Posted - Jan 21 2008 :  2:41:27 PM  Show Profile  Reply with Quote
Hey this would save me tons of time.

I hate having to type lists like
txtDate.Text = p.Date;
CheckBox1.ISChecked = p.IsFOB;
Textbox1.Text = p.part;
etc etc etc...

the longer the list the more terrible. But what is even worse is when you have to switch the list

Could you make a refactor that switches sides of the equal sign.
to easily make the above list into
p.Date = txtDate.Text;
p.IsFOB = CheckBox1.ISChecked;
p.part = Textbox1.Text;

feline
Whole Tomato Software

United Kingdom
18943 Posts

Posted - Jan 21 2008 :  5:05:41 PM  Show Profile  Reply with Quote
use the IDE's find and replace in regular expression mode. For VS2005 this works well:

Find {\\t+}{.*} = {.*};
Replace with \\1\\3 = \\2;

zen is the art of being at one with the two'ness
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Reply to Topic
 Printer Friendly
Jump To:
© 2023 Whole Tomato Software, LLC Go To Top Of Page
Snitz Forums 2000