C#注册表操作类(完整版)
下面贴出自己用C#写的注册表操作类,欢迎大家拍砖!
1.注册表基项静态域
1 /// <summary>
2 /// 注册表基项静态域
3 ///
4 /// 主要包括:
5 /// 1.Registry.ClassesRoot 对应于HKEY_CLASSES_ROOT主键
6 /// 2.Registry.CurrentUser 对应于HKEY_CURRENT_USER主键
7 /// 3.Registry.LocalMachine 对应于 HKEY_LOCAL_MACHINE主键
8 /// 4.Registry.User 对应于 HKEY_USER主键
9 /// 5.Registry.CurrentConfig 对应于HEKY_CURRENT_CONFIG主键
10 /// 6.Registry.DynDa 对应于HKEY_DYN_DATA主键
11 /// 7.Registry.PerformanceData 对应于HKEY_PERFORMANCE_DATA主键
12 ///
13 /// 版本:1.0
14 /// </summary>
15 public enum RegDomain
16 {
17 /// <summary>
18 /// 对应于HKEY_CLASSES_ROOT主键
19 /// </summary>
20 ClassesRoot = 0,
21 /// <summary>
22 /// 对应于HKEY_CURRENT_USER主键
23 /// </summary>
24 CurrentUser = 1,
25 /// <summary>
26 /// 对应于 HKEY_LOCAL_MACHINE主键
27 /// </summary>
28 LocalMachine = 2,
29 /// <summary>
30 /// 对应于 HKEY_USER主键
31 /// </summary>
32 User = 3,
33 /// <summary>
34 /// 对应于HEKY_CURRENT_CONFIG主键
35 /// </summary>
36 CurrentCo