VERY NEWBIE: How to add properties to existing variable?

Posted on 2006-03-28
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
    LVL 6

    Accepted Solution

    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

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

    Thanks a lot!

    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    What Should I Do With This Threat Intelligence?

    Are you wondering if you actually need threat intelligence? The answer is yes. We explain the basics for creating useful threat intelligence.

    Suggested Solutions

    Title # Comments Views Activity
    Add row in datatable 18 43 mvc 2 30
    Problem to event 3 26
    c# string 6 27
    In one of my recent projects, I was working with IP cameras, I need to take some pictures from the camera and do some processing on it. The first step, was to retrieve the image from camera into Image object. So that it can be displayed or …
    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.
    It is a freely distributed piece of software for such tasks as photo retouching, image composition and image authoring. It works on many operating systems, in many languages.
    Illustrator's Shape Builder tool will let you combine shapes visually and interactively. This video shows the Mac version, but the tool works the same way in Windows. To follow along with this video, you can draw your own shapes or download the file…

    737 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

    Need Help in Real-Time?

    Connect with top rated Experts

    17 Experts available now in Live!

    Get 1:1 Help Now