This is a discussion on How can I access the registry from C# code DOT NET 2005? within the C# Programming forums, part of the Software Development category; How can I access the registry from C# code DOT NET 2005?...
| |||||||
| Register | FAQ | Members List | Calendar | Mark Forums Read |
| |||
| By using the Registry and RegistryKey classes in Microsoft.Win32, you can easily access the registry. The following is a sample that reads a key and displays its value: using System; using Microsoft.Win32; class regTest { public static void Main(String[] args) { RegistryKey regKey; Object value; regKey = Registry.LocalMachine; regKey =regKey.OpenSubKey("HARDWAREDESCRIPTIONSystemCentr alProcessor "); value = regKey.GetValue("VendorIdentifier"); Console.WriteLine("The central processor of this machine is: {0}.", value); } } |
![]() |
| Thread Tools | |
| Display Modes | |
| |
Similar Threads | ||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| What is Windows Registry? | arjkhanna | Operating Systems | 7 | 02-18-2008 11:10 AM |
| Practical issues when we develop code in Windows Forms in C#.Net 2005 | Sathish Kumar | C# Programming | 10 | 09-20-2007 07:17 AM |
| How to read and write System Registry Keys using C# (VS.Net 2005) | oxygen | C# Programming | 2 | 08-31-2007 11:41 PM |
| I Cannot access SQL 2005 integrated services after installing SQL-2005..? | theone | Database Support | 1 | 07-27-2007 01:12 AM |
| Access e-mail using Outlook Web Access | gattuso | Server Management | 0 | 07-19-2007 07:20 AM |