Can someone suggest good way, how to get all subcategories from the registry?

Example: I have HKEY_CURRENT_USER\\AnyName\\ in the registry and there are some catalogs so how to get list all of them in string?

有帮助吗?

解决方案

I am not totally sure I understand your question but if you want the sub key names you can do:

string[] subKeyNames = Registry.CurrentUser.OpenSubKey("AnyName").GetSubKeyNames();

There are lots of examples on the web for using the Registry class - also MSDN has some samples and explanations.

其他提示

Just enumerate sub-keys using GetSubKeyNames.

许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top