Config Helper
Write(RegistryLocation,String,String,Object) Method
Example 



KellermanSoftware.ConfigHelper Namespace > RegistryReaderWriter Class > Write Method : Write(RegistryLocation,String,String,Object) Method
Write to value the registry using the passed in location, subKey, and keyName
Syntax
Public Overloads Sub Write( _
   ByVal baseLocation As RegistryLocation, _
   ByVal subKey As String, _
   ByVal keyName As String, _
   ByVal value As Object _
) 
Dim instance As RegistryReaderWriter
Dim baseLocation As RegistryLocation
Dim subKey As String
Dim keyName As String
Dim value As Object
 
instance.Write(baseLocation, subKey, keyName, value)
public void Write( 
   RegistryLocation baseLocation,
   string subKey,
   string keyName,
   object value
)
public:
void Write( 
   RegistryLocation baseLocation,
   String^ subKey,
   String^ keyName,
   Object^ value
) 

Parameters

baseLocation
subKey
keyName
value
Example
//Trial Mode
RegistryReaderWriter reg = new RegistryReaderWriter();
 
//License Mode
//RegistryReaderWriter reg = new RegistryReaderWriter("John Smith 10000", "psdfljksfdl==");
 
reg.Write(RegistryLocation.CurrentUser, "SOFTWARE\\KellermanSoftware\\RegistryHelper", "ReadExtendedTest", "ReadExtendedTestValue");
 
object registryValue = reg.Read(RegistryLocation.CurrentUser, "SOFTWARE\\KellermanSoftware\\RegistryHelper", "ReadExtendedTest");
'Trial Mode
Dim reg As New RegistryReaderWriter()
 
'License Mode
'Dim reg As New RegistryReaderWriter("John Smith 10000", "psdfljksfdl==")
 
reg.Write(RegistryLocation.CurrentUser, "SOFTWARE\KellermanSoftware\RegistryHelper", "ReadExtendedTest", "ReadExtendedTestValue")
 
Dim registryValue As Object = reg.Read(RegistryLocation.CurrentUser, "SOFTWARE\KellermanSoftware\RegistryHelper", "ReadExtendedTest")
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
Overload List