OpenNetCF Registry problem.

  • Thread starter Thread starter Paul G. Tobey [eMVP]
  • Start date Start date
P

Paul G. Tobey [eMVP]

What have you tried? Changing "KeyName" (which should be "ValueName", not
"KeyName", probably)? How is intValue declared? Int? It needs to be
Int32.

Paul T.
 
Hi,

I am using the OpenNetCF Registry.cs. I have to store two types of values
into the registry. A string type and other Int type. I am successfully able
to write string values into the registry. But when I try to write an
interger into the registry it gives me some InvalidCast Exception.

I will tell you the steps, sorry i cant be exact because i am mailing from
my house and not from my work place.

1) CreateRegistryKey: This returns object of RegistryKey
2) RegistryKey.SetValue("KeyName" , intValue);
3) RegistryKey.Close();

I donno if I am missing something. But I am not able to overcome this error.

Any suggestions are welcomed.

thanks a lot in advance.

Amit.
 
Back
Top