سؤال

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