mirror of https://github.com/dahall/Vanara.git
Added ToRegString methods for Guids
parent
bd7004e95f
commit
21c5fcb28d
|
@ -44,5 +44,9 @@ namespace Vanara.Windows.Shell
|
|||
}
|
||||
|
||||
public static bool HasValue(this RegistryKey key, string name) => !Equals(key.GetValue(name, improbableValue), improbableValue);
|
||||
|
||||
public static string ToRegString(this Guid guid) => guid.ToString("B").ToUpperInvariant();
|
||||
|
||||
public static string ToRegString(this Guid? guid) => guid.HasValue ? guid.Value.ToRegString() : null;
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue