Hello Chuck,
testkey pre-existed as a DWORD value and after the setvalue becomes a
REG_SZ type. Even tried casting the aDoubleValue, but no change.
The native types for registry values are strings, binary values and DWORDs
(integers). There is no native type for storing a floating point value. If
you give the SetValue method a double value, it gets converted to a string.
So, the method works as expected.
You should either round or convert the value to an Int32 first, or store it
as a binary value if a string won't do. For example:
--------------------------------
Microsoft.Win32.RegistryKey key =
Registry.CurrentUser.OpenSubKey("Software\\ACME",t rue);
double myValue = 123.45;
key.SetValue("My Value",System.Convert.ToInt32(myValue));
key.Close();
--------------------------------
Hope this helps.
--
Regards,
Mr. Jani Järvinen
C# MVP
Helsinki, Finland
ja***@removethis.dystopia.fi http://www.saunalahti.fi/janij/