Windows :
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\RegisteredOrganization
:
using Microsoft.Win32;
, :
RegistryKey hklm = Registry.LocalMachine;
hklm = hklm.OpenSubKey("SOFTWARE\\Microsoft\\Windows NT\\CurrentVersion");
Object obp = hklm.GetValue("RegisteredOrganization");`
Console.WriteLine("RegisteredOrganization :{0}",obp);`
, Xiaofu.
- . , escape- #, , \n tab, \t, # , , , (\) @ (@ "\ somestring" ):
string org = (string)Microsoft.Win32.Registry.GetValue("HKEY_LOCAL_MACHINE\\\Software\\Microsoft\\Windows NT\\CurrentVersion", "RegisteredOrganization", "");
. RegisteredOrganization , . try/catch .