Gal*_*ali 5 c# registry windows-ce
你如何插入值1到属性CDInsert在HKEY_LOCAL_MACHINE\SOFTWARE\WJST\WLAN读回来?
小智 5
http://msdn.microsoft.com/en-us/library/microsoft.win32.registry%28v=VS.90%29.aspx
试试这个:
//using Microsoft.Win32;
RegistryKey reg = Registry.LocalMachine.OpenSubKey(@"SOFTWARE\WJST\WLAN", true);
// set value of "CDInsert" to 1
reg.SetValue("CDInsert", 1, RegistryValueKind.DWord);
// get value of "CDInsert"; return 0 if value not found
int value = (int)reg.GetValue("CDInsert", 0);
Run Code Online (Sandbox Code Playgroud)