Merhaba benim şöyle bi kodum var ve şu hatayı veriyor :
System.InvalidCastException: ''System.Byte[]' türündeki nesne 'System.String' türüne atılamadı.'
Hata verilen kod :
System.InvalidCastException: ''System.Byte[]' türündeki nesne 'System.String' türüne atılamadı.'
Hata verilen kod :
RegistryKey registryKey = Registry.LocalMachine.OpenSubKey("Hardware\\Description\\System\\CentralProcessor\\0", true);
if (registryKey == null)
return;
memorizedIDs.Add((string)registryKey.GetValue("SystemProductName"));
memorizedIDs.Add((string)registryKey.GetValue("Identifier"));
memorizedIDs.Add((string)registryKey.GetValue("Previous Update Revision"));
memorizedIDs.Add((string)registryKey.GetValue("ProcessorNameString"));
memorizedIDs.Add((string)registryKey.GetValue("VendorIdentifier"));
memorizedIDs.Add((string)registryKey.GetValue("Platform Specific Field1"));
memorizedIDs.Add((string)registryKey.GetValue("Component Information"));
registryKey.Close();