Question

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?

Était-ce utile?

La solution

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.

Autres conseils

Just enumerate sub-keys using GetSubKeyNames.

Licencié sous: CC-BY-SA avec attribution
Non affilié à StackOverflow
scroll top