RegistryOptions 枚举

定义

指定在创建注册表项时使用的选项。Specifies options to use when creating a registry key.

此枚举有一个 FlagsAttribute 属性,允许按位组合成员值。

public enum class RegistryOptions
[System.Flags]
[System.Serializable]
public enum RegistryOptions
type RegistryOptions = 
Public Enum RegistryOptions
继承
RegistryOptions
属性

字段

None 0

不可变的项。A non-volatile key. 这是默认设置。This is the default.

Volatile 1

可变的键。A volatile key. 此信息存储在内存中,并且在卸载相应的注册表配置单元时不保留此信息。The information is stored in memory and is not preserved when the corresponding registry hive is unloaded.

注解

你可以创建一个仅在内存中可用且在计算机重新启动时不会保持的注册表项。You can create a registry key that is available only in memory and that will not be persisted when the computer is restarted. 这称为可变键。This is known as a volatile key. 你可以通过使用RegistryKey.CreateSubKey options采用参数的方法重载来指定要创建可变或非易失键。You can specify that you want to create a volatile or non-volatile key by using the RegistryKey.CreateSubKey method overloads that take an options parameter.

适用于