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 5983449
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 22, 20262026-05-22T22:13:57+00:00 2026-05-22T22:13:57+00:00

I am looking at registry keys for a specific services. So I created a

  • 0

I am looking at registry keys for a specific services. So I created a class so i could create my objects for the regKeys for the specific service.

There are multiple services that all have multiple reg keys for that specific service.

My class

class Component
{
    private String regkey;
    private String regpath;

    //regkey
    private String getRegkey(String name)
    { return name; }

    public string regkeyProp
    {
        get { return (regkey); }
        set { regkey = getRegkey(value); }
    }

    //regpath
    private String getRegPath(String name)
    { return name; }

    public string regPathProp
    {
        get { return (regpath); }
        set { regpath = getRegPath(value); }
    }
}

So now i have my class defined so I can create my objects. So one of my services is the
sync service. So i created my new object called sync.


Component SYNC= new Component();

My other function scans thought he array and grabs every single regkey & path for the sync service.

When I am building my Sync object, I am assigning my regkeyProperty.


Sync.regkeyProps = regkeyValue;

So the issue here is that there is many regkeys for one sync service and when it goes though the for loop though the array it only stores the last reg key each time.

I am just stumped how i can accomplish this. I would assume some sort of array?

  • 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. Editorial Team
    Editorial Team
    2026-05-22T22:13:58+00:00Added an answer on May 22, 2026 at 10:13 pm

    I am guessing a bit of what it exactly is you are asking but i assume you want to keep a list of more than 1 Component objects. You could achieve this by doing something like this:

    List<Component> syncItems = new List<Component>();
    
    foreach (/* not sure how you loop over the items */)
    {
      Component sync = new Component();
      sync.regKeyProp = ...
      syncItems.Add(sync);
    }
    

    Also as a side note i would suggest choosing a different name from Component as a Component is already the name of some concept that is being used a lot in .NET

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm looking for a registry in the windows CE that if I will change/add/remove
I've been looking for a way to monitor for specific registry changes in Delphi.
I'm new to Zend framework and currently looking at Zend_Acl . There are multiple
I am looking for a clean way to check if a registry key exists.
Looking for a good set of base objects to start a website up in
Looking for a list of Windows versions (service packs included) and what version of
What data and where, should I add to the Windows registry to properly create
I have an x86 Windows application that consists of a couple of services and
I'm building a class or two based on StdRegProv to handle Windows Registry via
We are using WIX to install a number of services we create. I am

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.