Registry Value

Registry value is very easy to implement.

just use

using Microsoft.Win32;

& for insert use this code

private void button1_Click(object sender, EventArgs e)
{
    try
    {
        RegistryKey regkey = Registry.CurrentUser;
        regkey = regkey.CreateSubKey (@"Software\Tanmay\Sample"); //path
        if (regkey != null)
        {
            regkey.SetValue("Test", "Hello World"); //Value Name,Value Data
        }
    }
    catch (Exception ex)
    {
        MessageBox.Show(ex.Message);
    }
}

& for getting Registry value from registry use it..

private void button2_Click(object sender, EventArgs e)
{
    try
    {
        RegistryKey regkey = Registry.CurrentUser;
        regkey = regkey.CreateSubKey(@"Software\Tanmay\Sample"); //path
        string Br = (string)regkey.GetValue("Test");
        textBox1.Text = Br;
    }
    catch(Exception ex)
    {
        MessageBox.Show(ex.Message); 
    }
}

That's all.

Here I use only Registry.CurrentUser you can change it on your demand.

Thank you.