HOW TO ACCESS REGISTRY KEYS IN C#

Anupam Mishra

Total Post:135

Points:949
Posted by  Anupam Mishra
C#  .NET 
C#
 461  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. Anupam Mishra

    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 Jan-21-2016 03:08:42 AM

Answer

NEWSLETTER

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