views:

536

answers:

3

I have a string value that I want to write to the registry as a Dword to read via another program. How can i create a new key/string using c# .net?

+2  A: 

You need to use Microsoft.Win32.Registry to add to the mobile device registry. All of the methods have mobile support: http://msdn.microsoft.com/en-us/library/microsoft.win32.registry_members.aspx

Nick Berardi
+1  A: 

Using the Microsoft.Win32.Registry classes, just like on the desktop. There is one caveat: if you're using CF 1.0 then the classes don't exist. In that case I'd recommend pulling the implementation from the old SDF 1.4 source.

ctacke
A: 

You can use this class:

Microsoft.Win32.Registry

it is supported in .NET Compact Framework 3.5 and 2.0

The following links may help you:

How to: Create a Key In the Registry (Visual C#)

http://www.codeproject.com/KB/mobile/PocketRegistry.aspx

Baget