私は列挙型がどのように機能するかを理解しようとしています、レジストリのルートに列挙型を使用してレジストリに書き込む関数を作成しようとしていますが、ちょっと混乱しています
public enum RegistryLocation
{
ClassesRoot = Registry.ClassesRoot,
CurrentUser = Registry.CurrentUser,
LocalMachine = Registry.LocalMachine,
Users = Registry.Users,
CurrentConfig = Registry.CurrentConfig
}
public void RegistryWrite(RegistryLocation location, string path, string keyname, string value)
{
// Here I want to do something like this, so it uses the value from the enum
RegistryKey key;
key = location.CreateSubKey(path);
// so that it basically sets Registry.CurrentConfig for example, or am i doing it wrong
..
}