src/Microsoft/Windows/Registry/_Library/ExtensionMethods_IRegistryKey.cs
/// <summary>
/// Gets the value of a name/value pair as string and optionally expand it or a default value
/// </summary>
/// <param name="registryKey">The extended <see cref="IRegistryKey"/> instance.</param>
/// <param name="name">The name of the name/value pair.</param>
/// <param name="defaultValue">The default value to be used as fallback.</param>
/// <param name="expand">Set to true, if the value should be expanded.</param>
/// <returns>The value of the Name/Value pair as string, which is optionally expanded. Otherwise, the defaultValue is returned.</returns>
Gets the value of a name/value pair as string and optionally expand it or a default value
Gets the value of a name / value pair as string and optionally expand it or a default value
[DebuggerStepThrough]
        [MethodImpl( MethodImplOptions.AggressiveInlining )]
        public static string GetString( this IRegistryKey registryKey, string name, string defaultValue, bool expand ) {
            RegistryValueOptions options = expand ? RegistryValueOptions.None : RegistryValueOptions.DoNotExpandEnvironmentNames;
            return (string)registryKey.GetValue( name, defaultValue, options );
        }
[ DebuggerStepThrough ] [ MethodImpl ( MethodImplOptions . AggressiveInlining ) ] public static string GetString ( this IRegistryKey registryKey , string name , string defaultValue , bool expand ) { RegistryValueOptions options = expand ? RegistryValueOptions . None : RegistryValueOptions . DoNotExpandEnvironmentNames ; return ( string ) registryKey . GetValue ( name , defaultValue , options ) ; }
Gets the value of a name/value pair as string and optionally expand it or a default value
Gets the value of a name / value pair as string and optionally expand it or a default value
The value of the Name/Value pair as string, which is optionally expanded. Otherwise, the defaultValue is returned.
The value of the Name / Value pair as string which is optionally expanded . Otherwise the defaultValue is returned .
IRegistryKey
this
name
string
The name of the name/value pair.
The name of the name / value pair .
defaultValue
string
The default value to be used as fallback.
The default value to be used as fallback .
expand
bool
Set to true, if the value should be expanded.
Set to true if the value should be expanded .
registryKey
The extended  instance.
The extended instance .