Click here to Skip to main content
13,147,383 members (30,654 online)
Click here to Skip to main content
Add your own
alternative version

Tagged as


2 bookmarked
Posted 14 Sep 2010

Useful Refactoring Trick with instance variables

, 18 Sep 2010
Rate this:
Please Sign up or sign in to vote.
Visual Studio's refactoring tools are great. On a particular note, the CTRL + R, E would signal VS to generate the properties of the selected member. What it does is it turns the member private and generates the get and set properties.

However, the new property will be generated right below the field. You have no control over this. If you wait (as I did) by writing all the instance variables first and refactoring them to become private later, you would end up with a property below every field (It would seem messy). Hence, I suggest to quickly refactor every time you create an instance variable destined to be a property.


This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)


About the Author

Ruselo Riva Asentista
Philippines Philippines
No Biography provided

You may also be interested in...


Comments and Discussions

-- There are no messages in this forum --
Permalink | Advertise | Privacy | Terms of Use | Mobile
Web04 | 2.8.170915.1 | Last Updated 18 Sep 2010
Article Copyright 2010 by Ruselo Riva Asentista
Everything else Copyright © CodeProject, 1999-2017
Layout: fixed | fluid