Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 100887
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 11, 20262026-05-11T00:39:56+00:00 2026-05-11T00:39:56+00:00

After writing code to populate textboxes from an object, such as: txtFirstName.Text = customer.FirstName;

  • 0

After writing code to populate textboxes from an object, such as:

txtFirstName.Text = customer.FirstName; txtLastName.Text = customer.LastName; txtAddress.Text = customer.Address; txtCity.Text = customer.City; 

is there way in Visual Studio (or even something like Resharper) to copy and paste this code into a save function and reverse the code around the equal sign, so that it will look like:

customer.FirstName = txtFirstName.Text; customer.LastName = txtLastName.Text; customer.Address = txtAddress.Text; customer.City = txtCity.Text; 
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. 2026-05-11T00:39:56+00:00Added an answer on May 11, 2026 at 12:39 am

    Before VS2012:

    • Copy and paste the original block of code
    • Select it again in the place you want to switch
    • Press Ctrl-H to get the ‘Replace’ box up
    • Under ‘Find what’ put: {[a-zA-Z\.]*} = {[a-zA-Z\.]*};
    • Under ‘Replace with’ put: \2 = \1;
    • Look in: ‘Selection’
    • Use: ‘Regular expressions’
    • Hit Replace All

    With VS2012 (and presumably later) which uses .NET regular expressions:

    • Copy and paste the original block of code
    • Select it again in the place you want to switch
    • Press Ctrl-H to get the ‘Replace’ box up
    • Under ‘Find what’ put: ([a-zA-Z\.]*) = ([a-zA-Z\.]*);
    • Under ‘Replace with’ put: ${2} = ${1};
    • Make sure that the .* (regular expressions) icon is selected (the third one along under the replacement textbox)
    • Hit Replace All
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Ask A Question

Stats

  • Questions 70k
  • Answers 70k
  • Best Answers 0
  • User 1
  • Popular
  • Answers
  • Editorial Team

    How to approach applying for a job at a company ...

    • 7 Answers
  • Editorial Team

    How to handle personal stress caused by utterly incompetent and ...

    • 5 Answers
  • Editorial Team

    What is a programmer’s life like?

    • 5 Answers
  • added an answer In javascript you would do: textField['insert']('Hello World'); May 11, 2026 at 1:03 pm
  • added an answer Use firebug and see why the images don't show up.… May 11, 2026 at 1:03 pm
  • added an answer That behaviour is by design. It is a security restriction… May 11, 2026 at 1:03 pm

Related Questions

Often I find myself interacting with files in some way but after writing the
I am trying to implement ajax back/forward button support and therefore writing variables after
I'm writing a direct3d application and after noticing strange bugs such as anti-aliasing occurring
After using AS2 for several years, I'm getting started with writing applications in AS3
I was wondering when most people wrote their unit tests, if at all. I
currently i have jdbc code with the following basic stucture: get Connection (do the
I have several servers hosted with GoGrid, and every time I reboot one of

Trending Tags

analytics british company computer developers django employee employer english facebook french google interview javascript language life php programmer programs salary

Top Members

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.