> ## Content Index
> Fetch the complete content index at: https://www.mrstebo.co.uk/llms.txt
> Use this file to discover other available public pages before exploring further.

# Deriving from our RegistryConfig class
- URL: https://www.mrstebo.co.uk/deriving-from-our-registryconfig-class/
- Published: 2014-04-22T23:00:00.000Z
- Updated: 2023-05-15T23:42:50.000Z
- Author: Steven Atkinson
- Tags: C Sharp Programming, Dotnet, Programming, Software Architecture, Software Development

Now we have our abstract `RegistryConfig` class ready to use we can create our new subclass. This will hopefully show you how easy it is to create properties that utilize the methods of the `RegistryConfig` class!

# Creating our subclass

Lets call our new class TestConfig and build a constructor that will pass some parameters down the `RegistryConfig` class.

This will create a new subkey at ****HKEY\_CURRENT\_USER\\SOFTWARE\\Test**, which is where all our properties will be stored.

# Setting up a new property

The properties should use the `GetValue` and `SetValue`! It will also be easy to create new properties without too much change to the code. We can do this with reflection and our `ParsePropertyMethodName` function we have in the `RegistryConfig` class.

The `ParsePropertyMethodName` basically strips out the ****get\_** or ****set\_** from the method name.

# And there we have it!

This is what the new class should look like.

**When you first initialize a new instance of your* `**RegistryConfig*` *class you should probably call* `**Initialize*` *to set up the registry.*