FileAssociation/RegistryWrapper.cs
/// <summary>
/// Reads specified value from the registry.
/// </summary>
/// <param name="path">Full registry key (minus root) that contains value.</param>
/// <param name="valueName">Name of the value within key that will be read.</param>
/// <returns>Read value.</returns>
Reads specified value from the registry.
Reads specified value from the registry .
public object Read(string path, string valueName)
        {
            RegistryKey key = RegistryWrapper.ClassesRoot;
            string[] parts = path.Split('\\');
            if (parts == null || parts.Length == 0)
            {
                return null;
            }
            for (int x = 0; x < parts.Length; x++)
            {
                key = key.OpenSubKey(parts[x]);
                if (key == null)
                    return null;
                if (x == parts.Length - 1)
                {
                    return key.GetValue(valueName, null, RegistryValueOptions.DoNotExpandEnvironmentNames);
                }
            }
            return null;
        }
public object Read ( string path , string valueName ) { RegistryKey key = RegistryWrapper . ClassesRoot ; string [ ] parts = path . Split ( ' \\ ' ) ; if ( parts == null || parts . Length == 0 ) { return null ; } for ( int x = 0 ; x < parts . Length ; x ++ ) { key = key . OpenSubKey ( parts [ x ] ) ; if ( key == null ) return null ; if ( x == parts . Length - 1 ) { return key . GetValue ( valueName , null , RegistryValueOptions . DoNotExpandEnvironmentNames ) ; } } return null ; }
Reads specified value from the registry.
Reads specified value from the registry .
None
path
string
Full registry key (minus root) that contains value.
Full registry key ( minus root ) that contains value .
valueName
string
Name of the value within key that will be read.
Name of the value within key that will be read .