Added ToRegString methods for Guids

pull/38/head
David Hall 2019-01-27 17:41:34 -05:00
parent bd7004e95f
commit 21c5fcb28d
1 changed files with 4 additions and 0 deletions

View File

@ -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;
}
}