I have found the following code which reads and writes from the registry.
// Write a value to the registry
Microsoft.Win32.RegistryKey key;
key = Microsoft.Win32.Registry.CurrentUser.CreateSubKey("Names");
key.SetValue("Name","Isabella");
// Get value from registry
key.GetValue("Name");
textBox1.Text = key.GetValue("Name"); // error, how can I do?
key.Close();
How would I display the value in a TextBox?
Add a call
ToString()after ensuring the value isn’t null.