Config Helper
DefaultSubKey Property
Example 



KellermanSoftware.ConfigHelper Namespace > RegistryReaderWriter Class : DefaultSubKey Property
The Sub Key to Read or Write to. Defaults to SOFTWARE\NamespaceWord1\NamespaceWord2
Syntax
Public Property DefaultSubKey As String
Dim instance As RegistryReaderWriter
Dim value As String
 
instance.DefaultSubKey = value
 
value = instance.DefaultSubKey
public string DefaultSubKey {get; set;}
public:
property String^ DefaultSubKey {
   String^ get();
   void set (    String^ value);
}
Example
//Trial Mode
RegistryReaderWriter reg = new RegistryReaderWriter();
 
//License Mode
//RegistryReaderWriter reg = new RegistryReaderWriter("John Smith 10000", "psdfljksfdl==");
 
reg.DefaultSubKey = @"SOFTWARE\Kellerman Software\Registry Examples";
 
reg.Write("DefaultSubKeyTest", "DefaultSubKeyTestValue");
 
Console.WriteLine(reg.Read("DefaultSubKeyTest"));
'Trial Mode
Dim reg As New RegistryReaderWriter()
 
'License Mode
'Dim reg As New RegistryReaderWriter("John Smith 10000", "psdfljksfdl==")
 
reg.DefaultSubKey = "SOFTWARE\Kellerman Software\Registry Examples"
 
reg.Write("DefaultSubKeyTest", "DefaultSubKeyTestValue")
 
Console.WriteLine(reg.Read("DefaultSubKeyTest"))
Requirements

Target Platforms: Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2

See Also

Reference

RegistryReaderWriter Class
RegistryReaderWriter Members