<PackageReference Include="Microsoft.Win32.Registry" Version="4.6.0" />

Registry

public static class Registry
Provides RegistryKey objects that represent the root keys in the Windows registry, and static methods to access key/value pairs.
public static readonly RegistryKey ClassesRoot

Defines the types (or classes) of documents and the properties associated with those types. This field reads the Windows registry base key HKEY_CLASSES_ROOT.

public static readonly RegistryKey CurrentConfig

Contains configuration information pertaining to the hardware that is not specific to the user. This field reads the Windows registry base key HKEY_CURRENT_CONFIG.

public static readonly RegistryKey CurrentUser

Contains information about the current user preferences. This field reads the Windows registry base key HKEY_CURRENT_USER.

public static readonly RegistryKey LocalMachine

Contains the configuration data for the local machine. This field reads the Windows registry base key HKEY_LOCAL_MACHINE.

public static readonly RegistryKey PerformanceData

Contains performance information for software components. This field reads the Windows registry base key HKEY_PERFORMANCE_DATA.

public static readonly RegistryKey Users

Contains information about the default user configuration. This field reads the Windows registry base key HKEY_USERS.

public static object GetValue(string keyName, string valueName, object defaultValue)

Retrieves the value associated with the specified name, in the specified registry key. If the name is not found in the specified key, returns a default value that you provide, or null if the specified key does not exist.

public static void SetValue(string keyName, string valueName, object value)

Sets the specified name/value pair on the specified registry key. If the specified key does not exist, it is created.

public static void SetValue(string keyName, string valueName, object value, RegistryValueKind valueKind)

Sets the name/value pair on the specified registry key, using the specified registry data type. If the specified key does not exist, it is created.