In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-04-03 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >
Share
Shulou(Shulou.com)05/31 Report--
This article mainly introduces the relevant knowledge of "how to use the Registry class of C # operation registry". The editor shows you the operation process through an actual case. The operation method is simple and fast, and it is practical. I hope this article "how to use the Registry class of C # operation registry" can help you solve the problem.
Provides a RegistryKey object that represents the root key in the Windows registry and provides static methods to access key / value pairs.
Inheritance hierarchy
System.Object
Microsoft.Win32.Registry
Namespace: Microsoft.Win32
Assemblies: mscorlib (in mscorlib.dll)
The method name indicates that GetValue retrieves the value associated with the specified name in the specified registry key. Returns the default value you provided if the name is not found in the specified item, or null if the specified item does not exist. SetValue (String, String, Object) sets the specified name / value pair for the specified registry key. If the specified item does not exist, it is created. SetValue (String, String, Object, RegistryValueKind) sets the name / value pair of the specified registry key by using the specified registry data type. If the specified item does not exist, it is created. The field name describes the types (or classes) of the ClassesRoot definition document and the properties associated with those types. This field reads the Windows registry base key HKEY_CLASSES_ROOT. CurrentConfig contains configuration information about hardware that is not specific to the user. This field reads the Windows registry base key HKEY_CURRENT_CONFIG. CurrentUser contains information about current user preferences. This field reads the Windows registry base HKEY_CURRENT_USERDynData is out of date. Contains dynamic registry data. This field reads the Windows registry base key HKEY_DYN_DATA. LocalMachine contains configuration data for the local computer. This field reads the Windows registry base key HKEY_LOCAL_MACHINE. PerformanceData contains performance information for software components. This field reads the Windows registry base key HKEY_PERFORMANCE_DATA. Users contains information about the default user configuration. This field reads the Windows registry base key HKEY_USERS. Remarks
This class provides the standard root key set found in the registry on the computer running Windows. The registry is a storage device that contains information about applications, users, and default system settings. For example, an application can use the registry to store information that needs to be retained after the application is closed and can be accessed when the application is reloaded. For example, you can store color preferences, screen position, or window size. By storing the information in different locations in the registry, you can control the data separately for each user.
The base or root RegistryKey instance exposed by the Registry class describes the basic storage mechanism for subkeys and values in the registry. All entries are read-only because the registry depends on their existence. The items exposed by Registry are:
The name indicates that CurrentUser stores information about user preferences. LocalMachine stores configuration information for the local computer. ClassesRoot stores information about types (and classes) and their properties. Users stores information about the default user configuration. PerformanceData stores performance information for software components. CurrentConfig stores hardware information that is not user-specific. DynData stores dynamic data.
Once you have identified the root key under which you want to store / retrieve information in the registry, you can use the RegistryKey class to add or remove subkeys and manipulate the values of the given key.
Hardware devices can use plug-and-play interfaces to automatically place information in the registry. The software that installs the device driver can place information in the registry by writing to the standard API.
Static methods for getting and setting values
In .NET Framework version 2.0, the Registry class also contains staticGetValue and SetValue methods that set and retrieve values from registry keys. Each time you use both methods, they open and close registry keys, so when you access a large number of values, you might as well use similar methods in the RegistryKey class.
The RegistryKey class also provides methods that can be used to set Windows access control security for registry keys, data types that can be used to test values before values are retrieved, and methods to delete entries.
This is the end of the content about "how to use the Registry class of C# operating registry". Thank you for your reading. If you want to know more about the industry, you can follow the industry information channel. The editor will update different knowledge points for you every day.
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.