Config Helper
DefaultBaseLocation Property
Example 



KellermanSoftware.ConfigHelper Namespace > RegistryReaderWriter Class : DefaultBaseLocation Property
The Default Base Location. Defaults to RegistryLocation.CurrentUser
Syntax
Public Property DefaultBaseLocation As RegistryLocation
Dim instance As RegistryReaderWriter
Dim value As RegistryLocation
 
instance.DefaultBaseLocation = value
 
value = instance.DefaultBaseLocation
public RegistryLocation DefaultBaseLocation {get; set;}
public:
property RegistryLocation DefaultBaseLocation {
   RegistryLocation get();
   void set (    RegistryLocation value);
}
Example
//Trial Mode
RegistryReaderWriter reg = new RegistryReaderWriter();
 
//License Mode
//RegistryReaderWriter reg = new RegistryReaderWriter("John Smith 10000", "psdfljksfdl==");
 
reg.DefaultBaseLocation = RegistryLocation.LocalMachine;
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.DefaultBaseLocation = RegistryLocation.LocalMachine
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