I have a System.Win32.RegistryKey object that points to, for example, “HKCU\Software\Test”. The .Name property is populated with the absolute path. Is there a way to get only the current (relative) key name?
In the example above, I am looking for just the “Test” part of the path. I am looking for the Registry equivelent to System.IO.Path.GetDirectoryName without having to parse the path manually.
You can just call
System.IO.Path.GetDirectoryName.The
Path.*functions (except forGetFullPath()) are purely string manipulation functions and work fine even with non-filesystem paths.