How to access registry keys in C#

Total Post:135

Points:949
C#  .NET 
C#
 730  View(s)
Ratings:
Rate this:
I want to retrieve a subkeys under the registry key(any root key) in my local machine. Please give me a solution.

thank you.
  1. Post:135

    Points:949
    Re: How to access registry keys in C#

    Here, we want to access of existing subkey (i have already created subkeys. ) value.

    for retrieving subkey values, we used GetValue method . code is below: 

            RegistryKey key;
                    key = Registry.CurrentUser.OpenSubKey("Anupam Software");
                    String s = (String)key.GetValue("Anupam");
                    Console.WriteLine("Registry Value: " + s);

    Output:

    My Software

      Modified On Apr-11-2018 12:38:28 AM

Answer

NEWSLETTER

Enter your email address here always to be updated. We promise not to spam!