VERY NEWBIE: How to add properties to existing variable?

Posted on 2006-03-28
Medium Priority
Last Modified: 2010-04-16
Dear Experts,

I'm switching from Java/JBuilder to C#/Visual Studio 2005...

Given an existing variable in my code, is there a one-button way to generate properties for it?  I know there is a way to insert a NEW variable-properties set, but I find this inconvenient.

Or better, is there a way to see a list of all variables, and just check them off to generate properties?  (JBuilder does this...)  

Question by:BrianMc1958

Accepted Solution

e1v earned 200 total points
ID: 16315181
Right click the variable, select Refactor->Encapsulate field from the context menu.

I don't know any way to do it with several variables at once

Author Comment

ID: 16315328
Great!  Would have sworn I tried that already.  I guess Visual Studio can tell I'm a newbie...

Thanks a lot!

Featured Post

[Webinar] Cloud and Mobile-First Strategy

Maybe you’ve fully adopted the cloud since the beginning. Or maybe you started with on-prem resources but are pursuing a “cloud and mobile first” strategy. Getting to that end state has its challenges. Discover how to build out a 100% cloud and mobile IT strategy in this webinar.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction This article series is supposed to shed some light on the use of IDisposable and objects that inherit from it. In essence, a more apt title for this article would be: using (IDisposable) {}. I’m just not sure how many people would ge…
Exception Handling is in the core of any application that is able to dignify its name. In this article, I'll guide you through the process of writing a DRY (Don't Repeat Yourself) Exception Handling mechanism, using Aspect Oriented Programming.
This video shows how to quickly and easily deploy an email signature for all users in Office 365 and prevent it from being added to replies and forwards. (the resulting signature is applied on the server level in Exchange Online) The email signat…
Despite its rising prevalence in the business world, "the cloud" is still misunderstood. Some companies still believe common misconceptions about lack of security in cloud solutions and many misuses of cloud storage options still occur every day. …
Suggested Courses

840 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question