switch (kind) { case RegistryValueKind.String: { string s = (string) o; break; } case RegistryValueKind.DWord: { int i = (int)o; break; } case RegistryValueKind.Binary: { byte[] b = (byte[])o; break; } //Case etc.... }>But Viv, I think that only answers part of Kevin's question. What do you do with it after that? IOW, you have this code:
> RegistryValueKind kind = x.GetValueKind("Update Status"); > Object o = x.GetValue("Update Status"); >>
>> RegistryKey rk = Registry.LocalMachine; >> RegistryKey x = rk.OpenSubKey("HARDWARE\\DESCRIPTION\\System\\CentralProcessor\\0"); >> RegistryValueKind kind = x.GetValueKind("Update Status"); >> Object o = x.GetValue("Update Status");